10654 Commits

Author SHA1 Message Date
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
d256bbd8c0
change rector-ci.php to rector.php (#4994) 2020-12-25 19:11:33 +01: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
TomasVotruba
d337b5753f cleanup 2020-12-25 00:18:02 +01:00
TomasVotruba
b911612ba3 fix yaml suffix 2020-12-24 23:05:50 +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
TomasVotruba
9c2cde103c update dockerignore 2020-12-24 17:45:45 +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
TomasVotruba
8771bffab4 fix path 2020-12-24 00:48:35 +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
TomasVotruba
01e6554600 [github] update issue template 2020-12-22 23:31:53 +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
a3db386854
drop ecs-after-rector, recommend current setup (#4944) 2020-12-22 17:14:24 +01:00
Tomas Votruba
cfcb237612
Delete test 2020-12-22 17:12:49 +01:00
Tomas Votruba
c97c769781
test 2020-12-22 17:12:11 +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
Abdul Malik Ikhsan
34e6c6ffdf
[Doc] Using transparent image for space.png (#4934) 2020-12-21 12:15:19 +01:00
Abdul Malik Ikhsan
8bccfd9bcf
[BetterStandardPrinter] Remove unneded cleanUpDuplicateContent() (#4933) 2020-12-21 11:57:39 +01: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
Charlie
c044b8ae97
Keep colon when it's used in Doctrine tag's original content. (#4924)
Co-authored-by: Charlie <charlie.vieillard@pixelindustries.com>
2020-12-20 13:58:04 +01: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