Tomas Votruba
db89b5eefa
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector ( #4989 )
...
* [CodeQuality] Move MoveVariableDeclarationNearReferenceRector
* move code-quality-strict rules to own namespace
* move MoveVariableDeclarationNearReferenceRector to CodeQualityStrict
* add ClassConstFetchFactory
* static fixes
2020-12-25 16:22:19 +00:00
Tomas Votruba
a2dbaedb0e
[Privatization] Move MakeUnusedClassesWithChildrenAbstractRector here ( #4987 )
2020-12-25 15:45:17 +01:00
Tomas Votruba
bfcdd22a7c
[Privatization] Move FinalizeClassesWithoutChildrenRector here ( #4986 )
2020-12-25 14:59:14 +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
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
61b72a8d7c
[DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here ( #4984 )
...
* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:56:59 +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
5a47e36b72
Add Visibility consts ( #4981 )
2020-12-24 23:01:30 +01:00
Tomas Votruba
d03fb14c3f
fix parent visilibty ( #4980 )
2020-12-24 21:58:07 +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
Abdul Malik Ikhsan
9433616c63
[EarlyReturn] Add ChangeOrIfReturnToEarlyReturnRector ( #4974 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 14:20:16 +01:00
Abdul Malik Ikhsan
cb5a36434e
[PHP 7.4] Skip TypedPropertyRector on standalone null type ( #4972 )
...
Fixes #4956
2020-12-24 11:02:32 +01:00
Tomas Votruba
f6900e687c
[PHP 8.0] Skip exception in match, must be expr ( #4971 )
...
* [PHP 8.0] Skip exception in match, must be expr
* add test case for var strings
* [ci-review] Rector Rectify
* skip universal
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 23:44:16 +00: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
Abdul Malik Ikhsan
8a648216ca
[CodingStyle] Re-use assigned variable for Method/Static/FuncCall/New_ on SplitDoubleAssignRector ( #4968 )
2020-12-23 21:42:40 +01:00
Tomas Votruba
aa35633c66
use getService() API call over static ( #4970 )
2020-12-23 21:40:46 +01:00
Abdul Malik Ikhsan
0e60e709e5
[CodingStyle] Skip SymplifyQuoteEscapeRector on \n\t ( #4966 )
2020-12-23 20:07:12 +01:00
Abdul Malik Ikhsan
2b001a542e
[Solid] Skip ChangeReadOnlyVariableWithDefaultValueToConstantRector on byRef parameter ( #4964 )
...
* [Solid] Fixes #4959 skip ChangeReadOnlyVariableWithDefaultValueToConstantRector on byRef parameter
* better check
* [ci-review] Rector Rectify
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 16:55:35 +00:00
Abdul Malik Ikhsan
c11a506b2b
[PHP 7.0] Skip StaticCallOnNonStaticToInstanceCallRector on dynamic static call ( #4962 )
...
* [PHP 7.0] Fixes #4954 Skip StaticCallOnNonStaticToInstanceCallRector on dynamic static call
* fixture
2020-12-23 15:37:17 +01:00
Abdul Malik Ikhsan
cd58dd958e
[CodingStyle] Skip CatchExceptionNameMatchingTypeRector on variable previously defined ( #4960 )
...
* [CodingStyle] Fixes #4946 Skip CatchExceptionNameMatchingTypeRector on variable previously defined
* move functionality look up previous node first with parent check to BetterNodeFinder
* cs fix
* better check
2020-12-23 15:33:14 +01:00
Abdul Malik Ikhsan
4eab2c4520
[CodingStyle] Failing fixture for MakeInheritedMethodVisibilitySameAsParentRector prepend public to protected on static ( #4951 )
...
* [CodingStyle] Failing fixture for MakeInheritedMethodVisibilitySameAsParentRector prepend public to protected on static
* fixed
* clean up
* patch ChangeMethodVisibilityRectorTest
2020-12-23 15:28:30 +01:00
Abdul Malik Ikhsan
48eaa5c950
[CodeQuality] Fixes #4950 Skip IssetOnPropertyObjectToPropertyExistsRector on property as variable ( #4953 )
2020-12-22 23:21:12 +01:00
Abdul Malik Ikhsan
9e6365cc58
[CodeQuality] Register SwitchNegatedTernaryRector to code-quality config set ( #4947 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-22 22:01:19 +01:00
Abdul Malik Ikhsan
24e17588c1
[Utils] Run validate-fixture-namespace/classname to rules/ directories ( #4935 )
2020-12-22 18:12:20 +01:00
Abdul Malik Ikhsan
003314b958
[CodeQuality] Add SwitchNegatedTernaryRector ( #4940 )
...
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-22 18:10:01 +01:00
Abdul Malik Ikhsan
8a39d6edbd
[DeadCode] Skip RemoveEmptyClassMethodRector on final method in non-final class ( #4943 )
2020-12-22 18:09:51 +01:00
Tomas Votruba
c5d258e0cc
[Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough ( #4939 )
...
* [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough
* fixup! [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough
2020-12-22 15:48:25 +00:00
TomasVotruba
06afa2bc94
remove commented code
2020-12-21 10:42:03 +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
Abdul Malik Ikhsan
7f674d7c8b
Using $this->mirrorComments() from AbstractRector to keep comment ( #4923 )
...
* Using $this->mirrorComments() from AbstractRector to keep comment
* fix
* fix
* clean up
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-12-20 13:56:43 +01: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
TomasVotruba
32eba83751
recomment
2020-12-20 00:43:59 +01:00
TomasVotruba
b7c6e2b7c0
apply cs
2020-12-19 23:37:11 +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
Abdul Malik Ikhsan
11d36a4bf9
[EarlyReturn] Add ReturnBinaryAndToEarlyReturnRector ( #4906 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-19 09:56:24 +01:00
Abdul Malik Ikhsan
511a9ac777
[Symfony Code Quality] Fixes EventListenerToEventSubscriberRector do not replace method call properly ( #4908 )
...
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: Flohw <git@f-pa.site>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: Flohw <flohw@users.noreply.github.com>
2020-12-19 09:51:44 +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
Abdul Malik Ikhsan
6c813e5e4d
[Solid] Skip MoveVariableDeclarationNearReferenceRector when next statement has static call ( #4914 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-18 18:18:40 +01:00
Abdul Malik Ikhsan
c196e46328
[PHP 8.0] Fixes #4852 Fixes crash on get_class() without parameter on ClassOnObjectRector ( #4910 )
2020-12-17 14:47:54 +01:00
Abdul Malik Ikhsan
bf4cd08947
[Utils] Run validate-fixture-namespace and validate-fixture-classname for /tests/ directory ( #4901 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-15 19:51:03 +01:00
Abdul Malik Ikhsan
e788d4db4c
[PHP72] Fixes WhileEachToForeachRector to keep comment on update to Foreach ( #4900 )
2020-12-15 17:37:15 +01:00
Leonardo Losoviz
51f5a42194
[Downgrade] Add ".0" after downgrading the numeric literal separator on floats ( #4889 )
...
* Updated test (to fail)
* If the float has no ".", add ".0" at the end
2020-12-15 09:44:17 +01:00
Krystian Marcisz
6f1eb0b6ff
[Symfony 5.2] Add PropertyPathMapperToDataMapperRector ( #4887 )
2020-12-14 21:03:46 +01:00
TomasVotruba
efb80cf98c
typo
2020-12-14 18:43:53 +01:00
Tomas Votruba
a8a0030bf9
Move package to 1st position in recipe ( #4882 )
...
* add alias
* [recipe] enable set by default, most contributors are core
* move package to 1st place, close to rule name where we think about package
* [ci-review] Rector Rectify
* fix recipe test
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-14 16:24:33 +00:00