75 Commits

Author SHA1 Message Date
Tomas Votruba
d0fb658dad
[Nette] Improve TemplateMagicAssignToExplicitVariableArrayRector with conditional if/else (#5527)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-13 13:25:47 +00:00
Tomas Votruba
eb3276e7fc
[NetteCodeQuality] Add MergeTemplateSetFileToTemplateRenderRector (#5525) 2021-02-13 01:08:54 +00:00
Tomas Votruba
afdf5839e7
[testing] change provideConfigFileInfo() to provideConfigFilePath() (#5518) 2021-02-12 19:19:40 +01:00
Tomas Votruba
ecbef2bcaa
[Tests] remove getPhpVersion() helped method, use configs instead (#5477) 2021-02-09 17:25:16 +00:00
Tomas Votruba
1757e83cdc
misc, remove RemoveProjectFileRector (#5463) 2021-02-08 18:26:00 +00:00
Tomas Votruba
d7353baf2c
Misc cleanup (#5456)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-08 12:33:17 +00:00
Tomas Votruba
7293c3c2a8
less traits 2 (#5384) 2021-01-30 23:20:05 +00:00
Tomas Votruba
734972d4b0
less traits (#5383) 2021-01-30 21:41:25 +00:00
Tomas Votruba
e1310abebb
[Nette 3.0] Add #[Inject] attribute (#5376) 2021-01-30 15:06:43 +00:00
Tomas Votruba
94dedf4bb3
[PHP 7.0] Update self in final class (#5304) 2021-01-24 20:12:02 +00:00
Tomas Votruba
87494ce3a6
Print only changed docblocks 🎉🎉🎉 (#5251) 2021-01-20 16:17:59 +00:00
Abdul Malik Ikhsan
c2c5228199
[TypeDeclaration] Improve FlipTypeControlToUseExclusiveTypeRector : add Nullable support for Assign expr (#5254)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-20 11:41:35 +00:00
Tomas Votruba
4b7f6f4a72
use PhpDocTagRemoer as a service (#5242)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 19:45:30 +00:00
Abdul Malik Ikhsan
6b196a96ea
[TypeDeclaration] Register FlipTypeControlToUseExclusiveTypeRector to type-declaration set (#5223)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2021-01-19 12:24:48 +01:00
Tomas Votruba
bbe758ab60
phpdoc info refactor part 4 (#5231)
* remove useless docblocks

* misc

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 01:15:32 +00:00
Tomas Votruba
ad9448018c
[PhpDocInfo Decouple] Use php doc info from factories, not from attribute (#5229)
* use single method to create docs

* use phpDocInfoFactory instead of getAttribte php doc info in Rectors

* move callig to phpDocInfoFactory

* misc
2021-01-18 21:45:13 +00:00
Tomas Votruba
a7550337f0
Add promoted property in PHP 8.0, when adding a ctor dependency (#5222)
* add PHP 8.0 test

* Add promoted property adding in constructor injection on PHP 8

* update tests to use propert promotion

* fix promoted property adding

* decopule Doctrine registry to manager

* shorter naming

* fix parent ctor completion

* nette promotion fixes

* fixes

* fix property inject

* misc

* misc
2021-01-18 13:09:48 +00:00
Tomas Votruba
ec92bcc95e
[phpstan] enable file lenght rule (#4999)
* enable file lenght rule

* longer file, just to show ci worked

* [ci] add ValidateFileLengthCommand

* [phpstan] drop PathsAreNotTooLongRule

* [Downgrade] Shorten property promotion rector rule

* [Symfony] Shorten AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector name

* shorten fixture name

* rename ChangeControlArrayAccessToAnnotatedControlVariableRector to AnnotateMagicalControlArrayAccessRector

* rename ReplaceMagicEventPropertySubscriberWithEventClassSubscriberRector to ReplaceMagicPropertyWithEventClassRector

* rename GetConfigWithDefaultsArgumentToArrayMergeInCompilerExtensionRector to MergeDefaultsInGetConfigCompilerExtensionRector

* rename ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector to ChangeStringCollectionOptionToConstantRector

* decouple ProjectFilesFinder
2020-12-26 14:53:21 +00:00
Tomas Votruba
cffd7ea0ac
[CodingStyle] Move PHPStormVarAnnotationRector (#4985)
* [CodingStyle] Move PHPStormVarAnnotationRector

* [ci-review] Rector Rectify

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here (#4984)

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>

* [ci-review] Rector Rectify

* cleanup docs

* static fixes

* [ci-review] Rector Rectify

* remove duplicated

* multi use case

* misc

* [ci-review] Rector Rectify

* fixes

* remove order set, slow

* move UseMessageVariableForSprintfInSymfonyStyleRector from solid set to coding-style

* make unique-named variables to prevent accidental override and improve readability

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 13:20:13 +00:00
Abdul Malik Ikhsan
ec5daad132
[Util] Add StaticInstanceOf (#4979)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 12:53:26 +01:00
Tomas Votruba
d465ec83e2
[DeadCode] Move RecastingRemovalRector from PHPStan set (#4983)
* [DeadCode] Move RecastingRemovalRector from PHPStan set

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:22:45 +00:00
Tomas Votruba
319d6bfca1
add phpstan-for-rector config path, consolidate return type extensions - re-use from Symplify (#4973)
* add phpstan-for-rector config path, to separate phpstan and extensions that help Rector with precise types

* move type value object to value object

* moving

* remove KernelGetContainerAfterBootReturnTypeExtension, use one from symplify

* remove ContainerGetDynamicMethodReturnTypeExtension to ContainerGetReturnTypeExtension

* remove nette extension

* add nette-extension

* removed delegated rule

* delegate implmenets + code sample PHPStan rule to symplify
2020-12-24 16:31:24 +00:00
Abdul Malik Ikhsan
ca0b4cfdc7
[EarlyReturn] Register ChangeOrIfReturnToEarlyReturnRector to early-return set (#4975)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 17:28:56 +01:00
Abdul Malik Ikhsan
24e17588c1
[Utils] Run validate-fixture-namespace/classname to rules/ directories (#4935) 2020-12-22 18:12:20 +01:00
Tomas Votruba
d131d804d9
Bump min PHP version to 7.3 (#4838)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 23:25:53 +01:00
Abdul Malik Ikhsan
35d8693187
[NetteUtilsCodeQuality] Fixes #4686 Add SubstrMinusToStringEndsWithRector (#4687)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-26 13:33:51 +01:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +00:00
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node (#4522)
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node

* update DecoupleClassMethodToOwnClassRector

* [ci] add rebase jobp

* disable fail fast for unit tests

* misc
2020-10-31 12:59:40 +00:00
Tomas Votruba
91a354c080
[NetteCodeQuality] Fix ChangeFormArrayAccessToAnnotatedControlVariableRector for in-closure (#4506)
* [NetteCodeQuality] Fix ChangeFormArrayAccessToAnnotatedControlVariableRector for in-closure

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* fix name

* fix unknown mixed type on fluent

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 21:25:35 +00:00
Tomas Votruba
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static (#4479) 2020-10-25 14:43:05 +01:00
Igor
f2ecdeb0b1
[Naming] Foreach over "data", renames to "datum" (#4221)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-15 10:23:13 +02:00
Tomas Votruba
59c5a5e5ba
[NodeRepository] Merge function like finder to NodeRepository (#4186)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-11 00:09:05 +02:00
Tomas Votruba
7ac228c638
[CI] Add type-declaration set (#4089)
* [CI] Add type-declaration set

* [rector] [CI] Add type-declaration set

* [cs] [CI] Add type-declaration set

* skip nullable void

* add anonymous parent/interface support

* refactor MultiExceptionCatchRector to use Catch_ over integers

* type fixes

* fix unoin array type override

* remove unused test cases

* drop overcomplicated InlineValidationRulesToArrayDefinitionRector

* skip assign on var

* [rector] skip assign on var

* [cs] skip assign on var

* [rector] [cs] skip assign on var

* skip assign on var

* fixes

* [rector] fixes

* [cs] fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 17:56:30 +00:00
Tom Pavelec
36b24b2bfc
fix: swapped naming of camel and pascal cases (#4047) 2020-08-28 18:07:15 +02:00
Tomas Votruba
8784a81ff7
[Fluent] Add factory case (#3950) 2020-08-12 20:24:52 +02:00
dobryy
411d76f9a9
[Order] Make OrderPrivateMethodsByUseRector process file in one run u… (#3889)
* [Order] Make OrderPrivateMethodsByUseRector process file in one run using while loop

* [Order] Enable rule in CI

* [rector] [Order] Enable rule in CI

* [cs] [Order] Enable rule in CI

* [Order] Use constant for number of max attempts and throw exception when exceeded.

* [rector] [Order] Use constant for number of max attempts and throw exception when exceeded.

* [cs] [Order] Use constant for number of max attempts and throw exception when exceeded.

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-05 22:45:36 +02:00
Tomas Votruba
2bd1eac705
use dev nette deps to resolve form/application types (#3879) 2020-08-03 08:51:44 +00:00
Tomas Votruba
39ec802963
[NetteCodeQuality] Fix unset, on purpose (#3877) 2020-08-02 19:54:15 +02:00
Tomas Votruba
552b97d90e
add param type test case (#3876) 2020-08-02 16:58:56 +00:00
Tomas Votruba
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00:00
Tomas Votruba
b99a3cbdb2
add case with type form (#3874) 2020-08-02 12:58:14 +00:00
Tomas Votruba
bb6a53fef0
[NetteCodeQuality] Skip isset on form input + multiplier check (#3872) 2020-08-02 12:57:05 +02:00
Tomas Votruba
ee957111c4
fix import slash (#3871) 2020-08-02 10:04:46 +00:00
Tomas Votruba
91bda1b75b
[NetteCodeQuality] Get component (#3870) 2020-08-02 11:39:52 +02:00
Tomas Votruba
6186cdeab7
skip form (#3869) 2020-08-02 01:24:58 +02:00
Tomas Votruba
62ac58e60d
add failing test case + add support for previous assign type dim fetch (#3868) 2020-08-02 00:57:35 +02:00
Tomas Votruba
fa2caf77ed
[NetteCodeQuality] Add ArrayAccessSetControlToAddComponentMethodCallRector (#3867) 2020-08-02 00:18:40 +02:00
Tomas Votruba
55acb3578a
[MagicDisclosure] Add SetterOnSetterMethodCallToStandaloneAssignRector (#3860)
* [MagicDisclosure] Add MethodCallOnSetterMethodCallToStandaloneAssignRector

* merge ChainMethodCallManipulator to ChainMethodCallNodeAnalyzer for better DX

* [MagicDisclosure] Add in arg defluent

* rebase
2020-08-01 11:41:16 +00:00
TomasVotruba
1c2045e710 add assign to root stmt to prevent non-existing variable 2020-07-30 23:33:13 +02:00
TomasVotruba
fd6f905651 cover parent createComponent() too 2020-07-30 23:00:55 +02:00