153 Commits

Author SHA1 Message Date
dobryy
2e7bdca4e2
[DX] Rename namespaces respect node type (#3973) 2020-08-18 17:57:30 +02:00
Tomas Votruba
f71b242924
[Defluent] Allow DateTime to be fluent (#3947)
* ignore prefixed conflcits

* note

* skip date-time from defluencing

* drop parameter name guard, not needed anymore

* make use of addNodesAfterNode()
2020-08-12 12:32:45 +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
Tomas Votruba
734d11f6c9
[SOLID] Skip func calls that change variable in ChangeReadOnlyVariableWithDefaultValueToConstantRector (#3916) 2020-08-07 00:25:25 +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
e7429d96a4
make use of constant (#3875) 2020-08-02 13:17:33 +00: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
dobryy
3aa2fc8727
[Order] Order properties and constants with respect of complexity and position (#3826)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 22:20:45 +02:00
TomasVotruba
99db894192 restore types 2020-07-27 10:44:51 +02:00
dobryy
f37cd4cac3 [Order] Apply rule 2020-07-26 15:11:41 +02:00
TomasVotruba
5106475aae bump to phpstan 0.12.33 2020-07-26 11:30:43 +02:00
TomasVotruba
7ed4cb19c4 simplify config globs 2020-07-25 20:14:28 +02:00
TomasVotruba
44040eba97 [Nette] Add external form factory support 2020-07-24 17:16:37 +02:00
dobryy
4a025c7a2b [DeadCode] Fix variable usage detection 2020-07-22 22:37:22 +02:00
TomasVotruba
d4fb908810 [DeadCode] Skip @api in unused public constastants 2020-07-21 08:13:31 +02:00
TomasVotruba
c2c1066374 [rector] apply on rules 2020-07-19 20:52:42 +02:00
TomasVotruba
cef48cb952 skip reporting of RemoveConcatAutocastRector in case of no change 2020-07-19 15:32:26 +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
379770495a [DeadCode] Skip property used as arg 2020-07-07 22:27:28 +02:00
TomasVotruba
69691157bd [DeadCode] Make RemoveDeadReturnRector skip arrow functions 2020-07-06 22:12:01 +02:00
TomasVotruba
3c3c3a9530 remove func call from methods calls 2020-07-06 01:59:41 +02:00
TomasVotruba
00da1fde74 fix class name 2020-07-01 21:54:16 +02:00
TomasVotruba
c08d874107 make use PhpDocTrait 2020-06-30 02:27:55 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
0cb82c2a6f apply new Naming_ 2020-06-30 00:57:38 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
9922ba600b make Rector description required for dumping documentation 2020-06-16 13:47:57 +02:00
Tim Ward
9ef5dc3e26 Update rules/dead-code/tests/Rector/Property/RemoveNullPropertyInitializationRector/TypedPropertiesRemoveNullPropertyInitializationRectorTest.php
Require at least php 7.4

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-06-15 11:00:25 +02:00
Tim Ward
96cfe58a5b Create TypedPropertiesRemoveNullPropertyInitializationRectorTest.php 2020-06-15 11:00:25 +02:00
Tim Ward
f54fd18b98 Delete typed_properties.php.inc 2020-06-15 11:00:25 +02:00
Tim Ward
58aa6bf001 Move TypedPropertyClass
To its own fixture folder
2020-06-15 11:00:25 +02:00
Tim Ward
bc037a0002 Add new fixture to test new feature
Verifies that null isn't removed as a default value for properties that are typed to nullable.
2020-06-15 11:00:25 +02:00
Tim Ward
3bea6c8341 Don't remove null if the property is type hinted to nullable 2020-06-15 11:00:25 +02:00
TomasVotruba
093f425c4d decouple reporting package 2020-05-26 14:36:11 +02:00
TomasVotruba
c92b572277 skip recursive call for method call name 2020-05-22 10:53:53 +02:00
TomasVotruba
0c67709fd0 [Legacy] Add FunctionToStaticMethodRector 2020-05-13 15:50:30 +02:00
TomasVotruba
d687bf7dba styling 2020-05-06 23:36:28 +02:00
TomasVotruba
9c65e7ac75 [SOLID] Add RepeatedLiteralToClassConstantRector 2020-05-06 23:36:28 +02:00
TomasVotruba
491a417842 various @todo resolved 2020-05-06 17:37:27 +02:00
TomasVotruba
b11ca167b0 keep comments removed with related-stmt 2020-05-06 12:59:08 +02:00
TomasVotruba
69dfe3cf96 Fix multi-comment malforming 2020-05-05 00:19:45 +02:00
TomasVotruba
ef5501d06c various cs cleanup 2020-05-03 21:33:36 +02:00
TomasVotruba
d539160980 make few rules silent on no change to prevent false positive reports on changed nodes 2020-05-03 13:18:59 +02:00
TomasVotruba
b0836bde3c use propety over property property 2020-04-29 13:53:06 +02:00
TomasVotruba
1bf62ac1c7 [cs] sort private methods by call order and property by complexity 2020-04-26 02:57:47 +02:00
TomasVotruba
c64a71ecad phsptan fixes 2020-04-25 16:45:36 +02:00
TomasVotruba
d865f69793 [DX] Add validate fixture suffix 2020-04-23 21:36:19 +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