45 Commits

Author SHA1 Message Date
TomasVotruba
c4595c7b69 update to php-parser 4.5 2020-06-03 11:39:18 +02:00
TomasVotruba
f27f50bf9c rework AbstractRunnableRectorTestCase from eval to include 2020-05-31 14:11:04 +02:00
TomasVotruba
e3463b1073 add comments constant to prevent typos 2020-05-25 17:03:48 +02:00
Guilliam Xavier
86cd497105 Fix SimplifyArraySearchRector w.r.t. "strictness" 2020-05-24 12:21:45 +02:00
TomasVotruba
0c67709fd0 [Legacy] Add FunctionToStaticMethodRector 2020-05-13 15:50:30 +02:00
TomasVotruba
84596b767f [CodeQuality] Fix SimplifyIfReturnBoolRector for else if 2020-05-12 16:30:20 +02:00
TomasVotruba
65a25fc57e fix comment preserving for SimplifyIfReturnBoolRector 2020-05-06 12:52:50 +02:00
TomasVotruba
e8ac877527 remove @todo from fixtures 2020-05-05 14:24:56 +02:00
TomasVotruba
8e51ff8ead decouple CommentCombiner 2020-05-05 14:24:56 +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
1bf62ac1c7 [cs] sort private methods by call order and property by complexity 2020-04-26 02:57:47 +02:00
TomasVotruba
1cd6803847 [CodeQuality] Fix CompactToVariablesRector for unknown names 2020-04-24 23:53:29 +02:00
TomasVotruba
298df2dae1 [CodeQuality] Add UnusedForeachValueToArrayKeysRector 2020-04-24 19:14:30 +02:00
TomasVotruba
8082b3a2f2 [PHP 8.0] Add str_starts_with 2020-04-23 23:06: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
0939387553 use getProperty() 2020-04-19 23:27:37 +02:00
TomasVotruba
00797bbce3 [CodeQuality] Add SplitListScalarAssignToSeparateLineRector 2020-04-19 16:20:08 +02:00
TomasVotruba
814e6a1d5c add typed property test with mixed and PHP 7.4 2020-04-16 15:44:36 +02:00
TomasVotruba
b882ce533d [CodeQuality] Make ChangeArrayPushToArrayAssignRector skip spread 2020-04-16 13:36:07 +02:00
TomasVotruba
79f73d88f8 fix missing array key 2020-04-03 01:14:04 +02:00
TomasVotruba
17a90bb768 add test fixtures for #3125 2020-04-03 01:13:37 +02:00
Tomas Votruba
d3e5960dc2
Merge pull request #3089 from paslandau/run_fixtures_in_tests
Add RunnableTestCase to run fixed code in a test
2020-03-29 18:49:34 +02:00
Pascal Landau
016124b215 Add RunnableTestCase to run fixed code in a test
- added RunnableTestCase::assertOriginalAndFixedFileYieldSameResult($file)
that takes a fixture file and expects fixture classes that implement the
new RunnableInterface which exposes a run() method
- the fixture class is dynamically renamed to avoid naming conflicts
and loaded via eval()
- fixtures that don't implement the RunnableInterface are ignored
otherwise the run() method is called on the original class as well
as on the fixed one and the output is expected to be equal
(via assertSame)
2020-03-29 13:09:09 +02:00
TomasVotruba
058f1c7932 [Privatization] Add PrivatizeLocalGetterToPropertyRector 2020-03-29 03:58:00 +02:00
Pascal Landau
1513ee16cd Fix ArrayKeysAndInArrayToArrayKeyExistsRectorTest
- fixed typo in RectorDefinition code sample
- fixed argument order of array_key_exists
- renamed test folder from ArrayKeysAndInArrayToIssetRector
  to ArrayKeysAndInArrayToArrayKeyExistsRector
2020-03-28 17:35:14 +01:00
TomasVotruba
74416461bb use array_key_exists instead of isset 2020-03-28 15:12:29 +01:00
TomasVotruba
22487811b3 [CodeQuality] Add ArrayKeysAndInArrayToIssetRector 2020-03-28 00:26:41 +01:00
TomasVotruba
4615a9d83d Fix ForToForeachRector for used dim fetch 2020-03-16 21:06:50 +01:00
TomasVotruba
66bd900e18 clear fixture 2020-03-16 17:00:19 +01:00
Christian Rishøj
db70bbf21f
separate fixture file (re rectorphp/rector#3026) 2020-03-16 16:17:58 +01:00
Christian Rishøj
6e63e3b0b7
isolate case with inapplicable loop (re rectorphp/rector#3026) 2020-03-16 16:15:56 +01:00
Christian Rishøj
052fb9a506
add failing test case 2020-03-16 14:41:53 +01:00
TomasVotruba
fe86fc4365 make use of isFuncCallName() method 2020-03-01 00:06:45 +01:00
TomasVotruba
83eca131e9 improve ForToForeachRector 2020-03-01 00:03:32 +01:00
TomasVotruba
9ff0b6a07a decopule isNodePartOfAssign() method 2020-02-29 23:55:00 +01:00
TomasVotruba
93633a4c04 [CodeQuality] Add InlineIfToExplicitIfRector 2020-02-22 13:07:36 +01:00
TomasVotruba
bc24bb12ff prevent getName() on StaticCall or MethodCall 2020-02-21 16:41:33 +01:00
TomasVotruba
99eeeabee2 fix nested array dim fetch resolving type 2020-02-21 01:52:45 +01:00
TomasVotruba
c25db0b56d apply 2020-02-19 00:14:44 +01:00
TomasVotruba
1ad8f08ccd [SOLID] Add ChangeReadOnlyVariableWithDefaultValueToConstantRector 2020-02-18 23:59:07 +01:00
TomasVotruba
1498108d95 fix single line comment 2020-02-17 00:03:28 +01:00
TomasVotruba
d1b4779889 apply properties to constants rule from SOLID 2020-02-16 17:47:00 +01:00
TomasVotruba
86bcb6eb7b fix cs 2020-02-13 22:48:16 +01:00
TomasVotruba
3e5dd77bb6 move Rector-rule based packages from /packages to /rules 2020-02-11 13:41:37 +01:00