Abdul Malik Ikhsan
d8e13e9144
[AbstractRector] Add rollbackComments ( #5005 )
2020-12-27 10:54:05 +01:00
Tomas Votruba
8de8cddaf6
[PHP 8.0] Skip accessed variable before property assign ( #5008 )
...
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-27 02:07:52 +00:00
TomasVotruba
f49c14618a
clean
2020-12-27 02:45:00 +01:00
Tomas Votruba
28a02fbfcd
Add failing test fixture for RemoveCodeAfterReturnRector
...
# Failing Test for RemoveCodeAfterReturnRector
Based on https://getrector.org/demo/efb7f3ed-e28a-4f31-b83f-50adfb17d309
2020-12-27 02:39:11 +01:00
Tomas Votruba
8c516e4f5c
[PHP 8.0] Skip promotion property if worked with before assign ( #5006 )
...
* test: ClassPropertyAssignToConstructorPromotionRector: should ignore early returns
* correct file location
* [PHP 8.0] Skip usage of variable before assign in promotion property
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-27 01:04:31 +00:00
TomasVotruba
5e358ec38a
fix property varlike vs var name
2020-12-27 00:41:30 +01: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
32272a97a1
[PHPStan] Added PathsAreNotTooLongRule phpstan rule ( #4998 )
...
* Added PathsAreNotTooLongRule phpstan rule
* static fixes
Co-authored-by: Markus Staab <m.staab@complex-it.de>
2020-12-26 13:35:23 +00:00
Abdul Malik Ikhsan
3ef72c375f
[DeadDocBlock] Skip RemoveNonExistingVarAnnotationRector on has other comment before var ( #4988 )
...
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-26 11:30:52 +01:00
Tomas Votruba
4e06c46253
[cs] add variable types ( #4996 )
2020-12-25 22:10:35 +00:00
Tomas Votruba
ed475a2e3c
[static] no nullable node ( #4995 )
...
* move phpstan.neon cusotm rules to rector-rules.neon, to cleanup main config
* enable forbidden rule on nullable nodes
* bump to Symplify 9.0.17
* make name non-nullable
* skip non-nullable
* skip null dim
2020-12-25 20:50:50 +00:00
Tomas Votruba
51dd6b899a
[SOLID] Drop UseInterfaceOverImplementationInConstructorRector, very subjective ( #4993 )
2020-12-25 17:24:53 +00:00
Tomas Votruba
a4f8a23ecf
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector ( #4992 )
2020-12-25 17:48:15 +01:00
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