48 Commits

Author SHA1 Message Date
Tomas Votruba
245000a0ce
[DeadCode] Improve unused private property detection (#4430)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-16 21:29:29 +02:00
Tomas Votruba
7aad4bbf2f
[PHPStan] Enable regex constant rule (#4279) 2020-09-23 11:16:40 +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
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
f5f7ba76af
[NoreRepository] merge ClassLikeParsedNodesFinder to NodeRepository (#4185)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-10 14:56:54 +02:00
Tomas Votruba
7cab529bf8
Introduce NodeRepository, single place to get all nodes (#4183)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-10 12:24:43 +02:00
dobryy
f69ea0e023
[Naming] Rename foreach value variable to match method return type (#4130)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-09 10:52:43 +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
Tomas Votruba
c1653070f5
[phpstan] Add rule for complex config (#4015)
* [phpstan] Add ForbiddenComplexArrayConfigInSetRule

* add MethodCallRename value object

* [SymfonyPhpConfig] Add array to value object configuration rule

* apply first MethodCallRename value object
2020-08-24 22:26:14 +00:00
Tomas Votruba
1c4b510513
PHPStan: require iterable types (#3936)
* phpstan: require iterable types

* add link on relative path and line

* fix missing class type

* typed array in Rector code + add data provide support resolver

* remove duplicated set

* drop unused yaml ecs config

* add out-of-the-box directory for 3rd party packages

* static fixes

* [rector] static fixes

* [cs] static fixes

* [rector] [cs] static fixes

* generic types

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 10:59:04 +00: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
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
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
0650075005 [Nette] Add ChangeControlArrayAccessToAnnotatedControlVariableRector 2020-07-26 15:54:46 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
7ed4cb19c4 simplify config globs 2020-07-25 20:14:28 +02:00
TomasVotruba
c1e1053d1c correct names manually back to desired state 2020-07-19 21:32:18 +02:00
TomasVotruba
c2c1066374 [rector] apply on rules 2020-07-19 20:52:42 +02:00
TomasVotruba
0944b75f7e correct namespace in configs 2020-07-18 11:58:17 +02:00
TomasVotruba
0c816d60f8 [config] switch rules config from YAML to PHP 2020-07-16 12:48:54 +02:00
TomasVotruba
ee291d1fdc use strings over ::class in type detection, as they ge tprifexed by phar builder 2020-07-12 16:38:04 +02:00
TomasVotruba
3c3c3a9530 remove func call from methods calls 2020-07-06 01:59:41 +02:00
TomasVotruba
78a97fb8bf typos, skip empty class 2020-07-01 22:28:58 +02:00
TomasVotruba
5cb1947407 skip null 2020-07-01 22:11:10 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
bcc5055d48 [Privatization] Add PrivatizeFinalClassMethodRector 2020-05-27 09:33:56 +02:00
TomasVotruba
ec3b928c7d [CodingStyle] UnderscoreToCamelCaseVariableAndPropertyNameRector 2020-05-25 00:51:08 +02:00
TomasVotruba
7994822d03 skip public properties 2020-05-24 22:32:22 +02:00
TomasVotruba
f63f5b2790 [Privatization] Add property privatization rule 2020-05-24 22:16:53 +02:00
TomasVotruba
32caab5376 fix doc FQN importing 2020-05-17 13:33:48 +02:00
TomasVotruba
9317ef2342 skip inject/handle methods too 2020-05-17 01:23:46 +02:00
TomasVotruba
12dc34daae [Privatization] skip controller action methods in PrivatizeLocalOnlyMethodRector 2020-05-17 01:19:59 +02:00
TomasVotruba
cb406e4d64 typo 2020-05-12 17:09:12 +02:00
TomasVotruba
cf6d2e0d02 move MinimalScope to Privatization, same purpose 2020-05-12 17:08:21 +02:00
TomasVotruba
1bf62ac1c7 [cs] sort private methods by call order and property by complexity 2020-04-26 02:57:47 +02:00
TomasVotruba
5f4a2c1e3b Add changed files caching 2020-04-20 01:54:17 +02:00
TomasVotruba
192c4464ec various improvements 2020-04-19 23:17:01 +02:00
TomasVotruba
4384712663 [Privatization] Make PrivatizeLocalOnlyMethodRector skip entities 2020-04-17 15:52:53 +02:00
TomasVotruba
d375cdc6f3 exclude public sniff config properties from privatization 2020-04-08 16:39:07 +02:00
TomasVotruba
e07df696b4 fix namespace 2020-04-08 16:35:46 +02:00
TomasVotruba
d654d07c13 fix PrivatizeLocalOnlyMethodRector for event subscriber methods 2020-04-08 16:19:53 +02:00
TomasVotruba
9a9f777513 [DeadCode] Add RemoveDeadRecursiveClassMethodRector 2020-03-31 15:17:42 +02:00
TomasVotruba
9466680a6d move constant privatization to privatization set 2020-03-29 20:02:47 +02:00
TomasVotruba
cbb50de280 [Privatization] Add PrivatizeLocalPropertyToPrivatePropertyRector 2020-03-29 19:07:26 +02:00
TomasVotruba
058f1c7932 [Privatization] Add PrivatizeLocalGetterToPropertyRector 2020-03-29 03:58:00 +02:00
TomasVotruba
58034ac5fa decouple ClassMethodVisibilityVendorLockResolver 2020-03-29 00:58:12 +01:00
TomasVotruba
91d1a1e397 [Privatization] Add PrivatizeLocalOnlyMethodRector 2020-03-29 00:06:01 +01:00