Tomas Votruba
a2dbaedb0e
[Privatization] Move MakeUnusedClassesWithChildrenAbstractRector here ( #4987 )
2020-12-25 15:45:17 +01: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
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
TomasVotruba
0326aec71c
renames on regex
2020-12-25 00:28:36 +01: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
Tomas Votruba
61e1ceaf5c
Cover ArrayShape type and other doc nodes ( #4967 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 22:11:37 +01:00
Tomas Votruba
aa35633c66
use getService() API call over static ( #4970 )
2020-12-23 21:40:46 +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
a759f1ffbc
Static fixes 3 ( #4930 )
...
* cleanpu baseline
* static fixes
* staitc fixes
* [Naming] Remove dead classes UnderscoreCamelCaseParamRenamer and MatchTypeParamRenamer
* static fixes
* value object fixes
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-21 02:12:42 +00:00
Tomas Votruba
d1e48f462a
Static fixes ( #4929 )
...
* static fixes
* fixup! static fixes
* fixup! fixup! static fixes
* fixup! fixup! fixup! static fixes
2020-12-20 21:27:30 +00:00
Tomas Votruba
37b3cecda3
Upgrade to php-parser 4.10.4 and PHPStan 0.12.63 ( #4926 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 22:05:48 +01:00
Tomas Votruba
2c8a76ef12
[Naming] add failing test case for type property collection name ( #4863 )
...
* add failing test case for type property collection name
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 15:10:06 +00:00
Tomas Votruba
574c7cd174
[static] Narrow param types, remove duplicated methods ( #4921 )
...
* narrow types and other static fixes
* duplicates static fixes
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 13:50:55 +01:00
Abdul Malik Ikhsan
720b2c34eb
[EarlyReturn] Enable ReturnBinaryAndToEarlyReturnRector in early-return config set ( #4915 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-19 16:24:53 +01:00
Leonardo Losoviz
20622c2541
Added tests for RenameVariableToMatchNewTypeRector ( #4898 )
...
* Added tests to fix issue
* Removed tests placed with wrong rule
* Added test with right rule
* Simplified className
* fixed
* [ci-review] Rector Rectify
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-18 23:18:17 +01:00
Tomas Votruba
2ea430b0ec
[PHP 8.0] Fix used variable rename in propperty promotion ( #4841 )
...
* [PHP 8.0] Add test case for used variable
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 23:40:38 +00: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
Leonardo Losoviz
ec4096134a
Added test cases to validate bug #4397 ( #4815 )
2020-12-07 12:11:38 +01:00
Tomas Votruba
db63a96397
[PHP 8.0] CI test fixes ( #4805 )
...
* [Downgrade PHP 8.0] Fix Union type
* run variable rename
* allow test
* fix regex
* allow run
* remove test dependency on DateTime changing api
* normalize
2020-12-06 10:19:17 +00:00
Tomas Votruba
bfd1953f97
move string downgrade types to object classes ( #4801 )
...
* move string downgrade types to object classes
* fix nullable type unwrap
* remove uneeded open tags from samples
* remove uneeded union type check
2020-12-06 00:27:00 +00:00
Abdul Malik Ikhsan
1e667b454f
[CI] Add PHP 8.0 to Github actions tests ( #4779 )
2020-12-05 12:10:44 +01:00
Tomas Votruba
132062acf3
[DeadCode] Fix dead method in property promotion ( #4749 )
...
* [DeadCode] Fix dead method in property promotion
* bump workflows PHP version to 7.2, to respect symplify bump
* allow non-existing attributes in tests
2020-12-02 10:15:39 +00:00
Tomas Votruba
f38dc68649
[Naming] Skip union type to resolve param name ( #4742 )
2020-12-01 15:57:41 +01:00
Abdul Malik Ikhsan
a38debb672
[DX] Fixes #4205 Change phpversion from string to php constant int type ( #4679 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-24 16:32:49 +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
Abdul Malik Ikhsan
4c243e1c9c
[Naming] Fixes #4621 : Skip rename when after rename has numeric in first char ( #4623 )
2020-11-16 13:04:32 +01: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
Abdul Malik Ikhsan
449801e1f3
Add regex uri to regex constant ( #4504 )
...
Co-authored-by: Jan Lohage <j2L4e@users.noreply.github.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 19:04:33 +01:00
Abdul Malik Ikhsan
9e0b632e4e
[CodeQualityStrict] Add CountArrayToEmptyArrayComparisonRector to CodeQualityStrict ( #4496 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-10-29 09:59:39 +01:00
Abdul Malik Ikhsan
7a1ea1328b
[CodeQuality] Register MoveOutMethodCallInsideIfConditionRector to config code-quality set ( #4477 )
...
* [CodeQuality] Register MoveOutMethodCallInsideIfConditionRector to config code-quality set
* rename use string parameter
* phpstan
* fix false positive string param to be var === variable name
* fix false positive
* phpstan
* ensure not same variable
* phpstan
* add ucfirst after var
* add fixture failing test for variable exists to be skipped
* add fixture failing test for variable exists in previuos statement
* phpstan space
* add handling variable exists in previous statement and in ClassMethod/Functions args
* handle exists but inside if
* reduce complexity
* clean up
* clean up
* cs fix
* phpstan
* remove - in variable
* use fallback when first character is numeric
* using regex to check string start alpha for variable
* cs fix
* use ClassConstFetch name to set variable name
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* clean up
* fix
* [ci-review] Rector Rectify
* Update rules/code-quality/src/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php
* Update rules/code-quality/src/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-10-26 14:03:26 +00:00
Tomas Votruba
5f3b4bde1f
[Naming] Allow does in MakeIsserClassMethodNameStartWithIsRector ( #4486 )
2020-10-26 10:22:20 +00:00
Tomas Votruba
b2c9e3b127
[DeadCode] Make RemoveUnusedPrivateConstantRector skip enum ( #4419 )
2020-10-15 13:04:58 +00:00
Tomas Votruba
c84690baa6
[DeadCode] Various improvements ( #4417 )
2020-10-15 14:15:01 +02:00
Tomas Votruba
01514ab9a8
[SimplePhpDocParser] Add README + getParam*() helper methods ( #4393 )
2020-10-11 16:17:43 +02:00
Igor
635e0292c2
Add missing abstract keyword ( #4347 )
...
* Remove CheckRequiredAbstractKeywordForClassNameStartWithAbstractRule related error from ignore
* Ignore new PHPStan errors
2020-10-04 22:41:31 +02:00
Abdul Malik Ikhsan
0680e70035
[naming] move UnderscoreToCamelCaseLocalVariableNameRector to Naming Set ( #4346 )
2020-10-04 12:48:43 +02:00
Igor
24f499c9d8
[Naming] Apply ParamRenamer without conflict resolution for Naming set ( #4335 )
2020-10-03 21:18:12 +02:00
Abdul Malik Ikhsan
3ff3e37ecb
[symfony] add AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector ( #4341 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-02 12:29:18 +02:00
Tomas Votruba
8ae3868a57
[Restoration] Add RestoreFullyQualifiedNameRector ( #4336 )
...
* [Restoration] Add RestoreFullyQualifiedNameRector
* update docs
* use service aware test case for PHPStan rules
* improve FullyQualifiedNameMatcher
* cs fixes
* add return doc resolution
* composer: bump to symfony 4.4/5.1
2020-10-01 19:45:29 +00:00
Abdul Malik Ikhsan
ae816c2c3d
Fixes #4337 : Make Option::SKIP works again with ParameterProvider ( #4339 )
2020-10-01 18:55:10 +02:00
Igor
6350692b98
[Naming] Move UnderscoreToCamelCaseVariableNameRector to Naming set ( #4312 )
2020-09-28 22:35:45 +02:00
Igor
ccb086aab7
[Naming] Make UnderscoreToCamelCasePropertyNameRector work with PropertyRenamer ( #4283 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-28 20:29:37 +02:00
Tomas Votruba
7aad4bbf2f
[PHPStan] Enable regex constant rule ( #4279 )
2020-09-23 11:16:40 +02:00
Igor
52f02d8c91
[Naming] Make bool property respect is/has/was naming ( #4215 )
2020-09-22 20:22:10 +00:00
Igor
19f700ba4e
[Naming] Factory to create PropertyRename ( #4255 )
...
* [Naming] Use factory to create PropertyRename
* Ignore new phpstan issues
* Move fixture to FixtureBasic to solve CI issue
* fix setUp vs dataProvider race condition
* fix autoload
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-21 20:45:43 +00:00
Igor
52f560a570
[Naming] Decouple conflict resolution ( #4253 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-19 10:29:39 +02:00
Igor
1582dc46f4
[Naming] Decouple property renaming into PropertyRenamer ( #4242 )
2020-09-17 23:18:18 +02: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