Commit Graph

5244 Commits

Author SHA1 Message Date
TomasVotruba 3c78a24f0e remove unused dependency 2020-04-13 11:50:07 +02:00
TomasVotruba c25c49b34d add isLocalPropertyFetchName() 2020-04-12 11:55:03 +02:00
Jeroen Thora e57c72499c Add extra allowed interface to EntityAliasToClassConstantReferenceRector 2020-04-10 13:03:04 +02:00
TomasVotruba 01be8d1eee [DeadCode] Fix RemoveUnusedDoctrineEntityMethodAndPropertyRector for id 2020-04-10 00:51:36 +02:00
TomasVotruba dd3db1d28b fix ThisCallOnStaticMethodToStaticCallRector in prefixed rector 2020-04-08 17:33:08 +02:00
TomasVotruba 30bfba7d3c check for array at UselessIfCondBeforeForeachDetector 2020-04-08 17:17:53 +02:00
TomasVotruba 22a55b85e1 fix sniff fro ChangeReadOnlyPropertyWithDefaultValueToConstantRector 2020-04-08 16:44:11 +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
Jeroen Thora 4e5c09fbb6 Make sure doctrine alias rector works in symfony controllers 2020-04-07 13:31:41 +02:00
TomasVotruba 4c4e56b168 make use of isStaticCallNamed() 2020-04-05 00:52:49 +02:00
TomasVotruba 9a7bd481e0 fix conflicting class name 2020-04-05 00:34:30 +02:00
TomasVotruba 6291b39ffa add github action check 2020-04-04 22:39:34 +02:00
TomasVotruba d29c4ede57 Add DoctrineAnnotationParserSyncer 2020-04-04 22:01:47 +02:00
TomasVotruba 593d19c786 cleanup 2020-04-03 13:24:44 +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
TomasVotruba c68b31f636 fix generics 2020-04-03 00:48:44 +02:00
TomasVotruba a1e5ecd7c2 generics 2020-04-03 00:38:36 +02:00
TomasVotruba cf28520234 improve performance of RemoveUnusedAliasRector by skipping un-aliases use 2020-04-02 12:12:45 +02:00
TomasVotruba b3fde24ab1 [PHPUnit] Add AddProphecyTraitRector 2020-04-01 02:37:21 +02:00
TomasVotruba 5600cf8d4d move node adding to PostRector 2020-04-01 01:41:56 +02:00
TomasVotruba 38fbcb28e5 move name-importing to PostRector 2020-03-31 20:13:18 +02:00
TomasVotruba 629042eeb4 move NodeRemovingRector to collector 2020-03-31 19:34:56 +02:00
TomasVotruba 7f2aef3d7d clear commander from AbstractRector 2020-03-31 17:49:26 +02:00
TomasVotruba a8da478d44 fix Safe\function conflicts 2020-03-31 17:46:04 +02:00
TomasVotruba e1140cf920 remove rather useless tearDown() from AbstractRector 2020-03-31 16:08:11 +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 144f8cad12 apply rules 2020-03-29 19:09:04 +02:00
TomasVotruba cbb50de280 [Privatization] Add PrivatizeLocalPropertyToPrivatePropertyRector 2020-03-29 19:07:26 +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
TomasVotruba 8b88afcc66 Fix @Route localized paths 2020-03-29 13:10:47 +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
TomasVotruba 17f9efc223 fix PregFunctionToNetteUtilsStringsRector for preg_match with non-assign 2020-03-29 01:05:18 +01:00
TomasVotruba 58034ac5fa decouple ClassMethodVisibilityVendorLockResolver 2020-03-29 00:58:12 +01:00
TomasVotruba 15945fc1bc move Legacy to rules 2020-03-29 00:58:12 +01:00
TomasVotruba 626287ec76 apply privatization 2020-03-29 00:06:05 +01:00
TomasVotruba 91d1a1e397 [Privatization] Add PrivatizeLocalOnlyMethodRector 2020-03-29 00:06:01 +01:00
Tomas Votruba 23b08fc2b1
Merge pull request #3087 from paslandau/fix_array_key_exists_rector
Fix ArrayKeysAndInArrayToArrayKeyExistsRectorTest
2020-03-28 17:40:03 +01: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 7474518b96 use just one type of printing 2020-03-28 16:27:26 +01:00
TomasVotruba 5df24b4087 decouple ChildParamPopulator 2020-03-28 16:16:29 +01:00
TomasVotruba 442e2abac5 [TypeDeclaratoin] Add class method param type resolving by property 2020-03-28 16:16:04 +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 8338004d4e test = 2020-03-27 22:53:40 +01:00
TomasVotruba c00b8d4b75 fix bracket mallform in annotations 2020-03-27 22:51:44 +01:00
TomasVotruba 6521583a40 fix importing of non-existing classes 2020-03-27 16:43:42 +01:00
TomasVotruba 31023ee27b # This is a combination of 2 commits.
# This is the 1st commit message:

fix importing of non-existing classes

# The commit message #2 will be skipped:

# fixup! fix importing of non-existing classes
2020-03-27 16:42:50 +01:00
TomasVotruba 557c2521df unused import is responsibility of coding standard 2020-03-27 16:40:52 +01:00
TomasVotruba 6fba2c610c cannot work with non-existing class 2020-03-27 16:40:52 +01:00
TomasVotruba 8f1208d18b drop preg_match support from StrContains, too vague 2020-03-27 15:20:20 +01:00
Den Girnyk 30c337e82c
Fix 'auto_import_names' tests fixtures path 2020-03-27 14:47:52 +02:00
TomasVotruba 3c3aa39f14 [PHP 80] Add StrContainsRector 2020-03-26 23:57:53 +01:00
TomasVotruba 9d4be977c4 remove ctor dependency on property/assign removal 2020-03-26 22:58:28 +01:00
TomasVotruba 5995db8262 add else case 2020-03-26 22:14:10 +01:00
TomasVotruba 6a8aa9b017 add count() > 0 case 2020-03-26 22:09:35 +01:00
TomasVotruba 0fe761f8ff Add empty() check to RemoveUnusedNonEmptyArrayBeforeForeachRector 2020-03-26 21:37:37 +01:00
Tomas Votruba 8406192dca
[DeadCode] Add RemoveAssignOfVoidReturnFunctionRector (#3068) 2020-03-25 22:51:12 +01:00
Tomas Votruba 5204ce1523
[DeadCode] Add RemoveUnusedNonEmptyArrayBeforeForeachRector (#3066) 2020-03-25 19:00:26 +01:00
Tomas Votruba 8492af2af1
[PHP 7.4] Fix ChangeReflectionTypeToStringToGetNameRector (#3064)
* [PHP 7.4] Fix ChangeReflectionTypeToStringToGetNameRector

* fixup! [Rector CI] Fixed Rector issues

* fixup! [Rector CI] Fixed CS issues

Co-authored-by: rector-bot <tomas@getrector.org>
2020-03-25 15:53:26 +01:00
TomasVotruba e9cf6e1544 Add basic concat support to PregReplaceEModifierRector 2020-03-25 14:19:37 +01:00
TomasVotruba 9827f7ec07 refactoring 2020-03-25 13:50:03 +01:00
TomasVotruba b113c38670 [PHP 5.5] Prevent error on non-string value in PregReplaceEModifierRector 2020-03-25 13:42:33 +01:00
TomasVotruba 6a0551f004 [DeadCode] Add RemoveUnusedFunctionRector 2020-03-25 12:50:51 +01:00
TomasVotruba f5d8804c20 improve PhpVersionFeature autocomplete by PHPStorm 2020-03-24 23:49:19 +01:00
TomasVotruba ff6a3d3140 [PHP 7.4] Add RestoreDefaultNullToNullableTypePropertyRector 2020-03-24 23:45:15 +01:00
TomasVotruba d608507f2e rename PHP sets to comply with standard 2020-03-24 23:44:42 +01:00
TomasVotruba 90044b30bc [PHP 7.4] Add default null type on properties 2020-03-24 23:07:33 +01:00
TomasVotruba 35ef3a0217 [PHP 7.4] Add id tag support + remove default array on collection 2020-03-24 22:49:41 +01:00
TomasVotruba aa9588f261 [PHP 7.4] Improve TypedProeprtyRector for Doctrine collection 2020-03-24 21:41:19 +01:00
Florian Dorn f0aca87c6a skip if not used with the `array []` operator 2020-03-24 09:54:03 +01:00
TomasVotruba 070c41d7c9 fix union type on ReturnTypeDeclarationRector 2020-03-23 19:33:31 +01:00
TomasVotruba eb88378488 improve chain method call resolutuin 2020-03-23 17:33:04 +01:00
TomasVotruba 0c3359e217 add variable to method call traverser 2020-03-23 17:16:10 +01:00
TomasVotruba 44a1654b66 split fixture 2020-03-23 17:16:10 +01:00
Grégoire Paris 88f27689eb WIP add createMock to createStub rector 2020-03-23 17:16:10 +01:00
TomasVotruba 3b57181603 add NotifyingNodeRemover 2020-03-19 13:56:38 +01:00
TomasVotruba 11114def28 add remove* method 2020-03-19 13:56:33 +01:00
TomasVotruba eca4d54f58 add PR annotate workflow 2020-03-19 13:56:23 +01:00
TomasVotruba 1d4a20d402 [DeadCode] Skip shifted variable 2020-03-18 16:56:50 +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 5cc6cdfb2b fix set location 2020-03-16 13:13:16 +01:00
TomasVotruba 18183dd55d add doctrine behaviors 20 2020-03-16 12:51:29 +01:00
Tomas Votruba a2a32a4919
Merge pull request #3021 from nightlinus/phpunit9-assertContainsEquals
add phpunit 9 rector to convert non-strict assertContains
2020-03-15 19:17:01 +01:00
nightlinus e2b5ff1df2 SpecificAssertContainsWithoutIdentityRector: add phpunit 9 compatibility rector
As of https://github.com/sebastianbergmann/phpunit/issues/3426 assertContains() and assertNotContains() will perform strict comparisons starting with PHPUnit 9 where non-strict comparisons were performed in PHPUnit 8 and earlier; assertContainsEqual() and assertNotContainsEqual() should be used instead if needed non-strict comparison
2020-03-15 12:16:55 +03:00
TomasVotruba b2a4787df8 add fix for getIterator() on Finder for Array spread 2020-03-14 14:52:55 +01:00
TomasVotruba 59d30ef584 check for used variable without comments 2020-03-09 23:42:24 +01:00
Tomas Votruba 59cf0665cb
Merge pull request #3009 from Aerendir/AnnotateThrowables-support-this-same-class
[ReadyToBeMerged][AnnotateThrowables] Support `$this` calling a method of the same class
2020-03-09 16:17:19 +01:00
TomasVotruba 21238589fe Revert "remove unused file"
This reverts commit c50621c4f9.
2020-03-09 15:54:35 +01:00
TomasVotruba c50621c4f9 remove unused file 2020-03-09 15:46:20 +01:00
Aerendir 8be8bc73ed Add failing test case for use of `$this` in same class with assignment. 2020-03-07 12:09:35 +01:00
Aerendir 08b681999e Add failing test case for use of `$this` in the same class. 2020-03-07 12:08:55 +01:00
Aerendir 4b0d8ad213 Fix a small mispelling. 2020-03-06 17:45:27 +01:00
Tomas Votruba 5a5d5dc340
Merge pull request #2998 from Aerendir/support-throwing-functions
AnnotateThrowables: support analysis of called functions and methods
2020-03-06 14:20:21 +01:00
Aerendir 5bfe7a15d8 Very deep refactoring. 2020-03-06 10:48:58 +01:00
Aerendir e88d18ca98 Clean `tests` folder. 2020-03-05 14:25:49 +01:00
Aerendir cc0fcb8446 Small refactorings. 2020-03-05 14:25:49 +01:00
Aerendir 1cbb1f1fe8 Support `$this->method()`. 2020-03-05 14:25:49 +01:00
Aerendir fe1a46e2b8 Apply fixes. 2020-03-05 10:05:35 +01:00
Aerendir 02673e6a77 Add doc comment to `refactor()` method. 2020-03-05 09:58:41 +01:00
Aerendir 60e00df74c Add link to `regex101.com`. 2020-03-05 09:58:41 +01:00
Aerendir 547b4d40b5 Support `ClassMethod`. 2020-03-05 09:58:41 +01:00
Aerendir c3d23f2491 Support `Assign`. 2020-03-05 09:58:36 +01:00
TomasVotruba 1b937ec0e0 fix method annotation 2020-03-04 23:22:29 +01:00
Aerendir ec691ff260 Support throwing methods. 2020-03-04 17:13:51 +01:00
Stefan Blanke 19d18c5a6a Add two failings tests 2020-03-04 14:54:21 +01:00
Aerendir d7cd5c3cba Complete refactoring. 2020-03-04 14:41:59 +01:00
Aerendir d449075643 Support analysis of called functions. 2020-03-04 09:13:42 +01:00
Dorian Villet b550b6bf3b Fix various static calls errors in PHPUnit Rectors. 2020-03-03 13:35:18 +01:00
Tomas Votruba 3d0bf1163d
Merge pull request #2990 from gnutix/AssertTrueFalseToSpecificMethodRector/add-broken-test-static-call
AssertTrueFalseToSpecificMethodRector: add broken test ('Pick more specific node than PhpParser\Node\Expr\StaticCall')
2020-03-03 11:52:39 +01:00
Dorian Villet 8425410119 Fix the implementation. 2020-03-03 10:23:43 +01:00
TomasVotruba 9c92126265 fix spacing of data provider 2020-03-03 10:18:54 +01:00
Dorian Villet 454e78ce8a AssertTrueFalseToSpecificMethodRector: add broken test ('Pick more specific node than PhpParser\Node\Expr\StaticCall'). 2020-03-03 09:59:49 +01:00
TomasVotruba b8ccd71b3a improve param array type for change type 2020-03-02 23:44:10 +01:00
TomasVotruba f7f2977748 fix count() code qauality 2020-03-02 17:38:00 +01:00
TomasVotruba a8fa941193 Fix PhpDocInfoPrinter slash removal 2020-03-02 17:25:15 +01:00
TomasVotruba 376e2e43ac skip open-source protected methods 2020-03-02 00:08:24 +01:00
TomasVotruba 54560e1143 add test case for open-source protected agr 2020-03-02 00:04:26 +01:00
TomasVotruba 40ab236fee skip empty method on open-source 2020-03-01 23:42:35 +01:00
TomasVotruba 0f8cdacd26 decouple FuncCallManipulator 2020-03-01 10:28:52 +01:00
TomasVotruba b611c4aeda decouple MagicMethodDetector 2020-03-01 10:06:59 +01:00
TomasVotruba 8b5c4f5726 [DeadCode] Fix shifted value 2020-03-01 09:53:08 +01:00
TomasVotruba 5aab2cec96 improve NodeTypeResolver complexity 2020-03-01 01:22:10 +01:00
TomasVotruba 94610569e7 improve ReturnTypeDeclarationRector complexity 2020-03-01 00:46:14 +01:00
TomasVotruba 37eaf518db improve RemoveUnusedAliasRector complexity 2020-03-01 00:38:46 +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 903483bf96 decouple ClassInsertManipulator 2020-02-29 22:10:06 +01:00
TomasVotruba 7eb2ac0e36 decopule class dependency manipulator methods 2020-02-29 21:22:00 +01:00
TomasVotruba d5b5e94508 add format preserving to union type node 2020-02-29 21:02:31 +01:00
TomasVotruba 7bc1703859 improve class cognitive complexity 2020-02-29 19:14:40 +01:00
TomasVotruba 67104fdca3 remove unused methods from ClassManipulator 2020-02-29 17:00:19 +01:00
TomasVotruba 53ac8fcc41 make RemoveUnusedClassConstant skip open-source public constants 2020-02-29 15:28:08 +01:00
TomasVotruba 6420f9322e fixup! Merge pull request #2966 from rectorphp/public-abstract 2020-02-29 15:23:37 +01:00
TomasVotruba d1b63e2e55 fix typoe open-source parameter 2020-02-29 15:06:05 +01:00
TomasVotruba e6489efac1 fix complexity 2020-02-29 12:37:22 +01:00
TomasVotruba 935b08e4ad fix get class on trait 2020-02-29 02:10:30 +01:00
Tomas Votruba d3bf2c0364
Merge pull request #2950 from gnutix/GetClassOnNullRector/add_broken_test_in_trait
[GetClassOnNullRector] Add failing test in trait.
2020-02-29 02:06:11 +01:00
TomasVotruba cabe6d5e62 fix scoping of OxidEsales 2020-02-29 01:37:15 +01:00
TomasVotruba 128910963a various fixes 2020-02-29 01:29:42 +01:00
Tomas Votruba 8f3e90ba7f
Merge pull request #2956 from gnutix/AssertTrueFalseInternalTypeToSpecificMethodRector/add-broken-test-method-call
AssertTrueFalseInternalTypeToSpecificMethodRector: add broken test method call
2020-02-29 01:23:55 +01:00
Tomas Votruba 1452472fc5
Merge pull request #2951 from gnutix/AddSeeTestAnnotationRectorTest/add-broken-test-simple-comment
AddSeeTestAnnotationRectorTest: add broken test for simple comment.
2020-02-29 01:21:48 +01:00
Tomas Votruba 3a71aaf910
Merge pull request #2954 from gnutix/RemoveDefaultArgumentValueRector/add-broken-test-static-method-call
RemoveDefaultArgumentValueRector: add broken test on static method call.
2020-02-29 01:21:39 +01:00
TomasVotruba e0baf3330b fix naming of non-func call 2020-02-29 01:20:34 +01:00
Tomas Votruba 6d2c6a0395
Merge pull request #2959 from rectorphp/fix-dim-array
fix return dim array fetch
2020-02-29 01:13:05 +01:00
Tomas Votruba 51b379b024
Merge pull request #2953 from gnutix/AssertRegExpRectorTest/add-broken-test-static-method-call
AssertRegExpRectorTest: add broken test on static method call
2020-02-29 01:12:58 +01:00
TomasVotruba 4c35675cca fix return dim array fetch 2020-02-29 01:12:08 +01:00
Dorian Villet cbdc4a1c2f AssertTrueFalseInternalTypeToSpecificMethodRector: add broken test on method call. 2020-02-28 17:20:54 +01:00
Dorian Villet 72be4f4450 RemoveDefaultArgumentValueRector: add broken test on static method call. 2020-02-28 17:10:11 +01:00
Dorian Villet 1a26e05ecc AssertRegExpRectorTest: add broken test when calling static method. 2020-02-28 16:54:12 +01:00
Dorian Villet 5781f8bb27 ReturnTypeDeclarationRector: add broken test. 2020-02-28 16:39:50 +01:00
Dorian Villet 05792e6a82 AddSeeTestAnnotationRectorTest: add broken test for simple comment. 2020-02-28 16:24:03 +01:00
Dorian Villet 567f8dda6d Add failing test in trait. 2020-02-28 15:49:50 +01:00
TomasVotruba cf358bb55b decouple ClassMethodPropertyFetchManipulator 2020-02-28 00:22:34 +01:00
TomasVotruba 15d07f4537 decouple PropertyFetchAssignManipulator 2020-02-28 00:15:32 +01:00
TomasVotruba e29f8fafab [DeadCode] Add RemoveDuplicatedIfReturnRector 2020-02-28 00:08:53 +01:00
TomasVotruba 7fd5234a10 check for dead-code info 2020-02-26 18:29:25 +01:00
TomasVotruba 1a4bb38126 skip open source class in rmeove unused param in open-source 2020-02-26 00:54:29 +01:00
TomasVotruba 53a3b18264 skip true/false case in TernaryToBooleanOrFalseToBooleanAndRector 2020-02-25 22:06:23 +01:00
TomasVotruba 3e7e3bf7dc add project_type 2020-02-25 21:43:29 +01:00
TomasVotruba 147b51b4c9 Fix prophecy mocking arg 2020-02-25 20:59:38 +01:00
TomasVotruba 788abf5131 add has lifecycle callbacks 2020-02-25 20:46:55 +01:00
TomasVotruba 0427133ec7 [DeadCode] Skip abstract methods in RemoveUnusedParameterRector as possible 3rd party contract 2020-02-25 10:52:37 +01:00
TomasVotruba 5c3aaf2ddc skip used property 2020-02-23 23:35:24 +01:00
TomasVotruba d074d5169a Fix FinalizeClassesWithoutChildrenRector for embedable 2020-02-23 23:25:58 +01:00
TomasVotruba 25aca8b774 [MysqlToMysqli] Add MysqlQueryMysqlErrorWithLinkRector 2020-02-23 23:13:49 +01:00
TomasVotruba f7aefc68b8 [DeadCode] Add RemoveUnusedVariableAssignRector 2020-02-23 22:36:23 +01:00
TomasVotruba c2b89700a3 [DeadCode] Add RemoveUnusedClassConstantRector 2020-02-23 22:07:19 +01:00
TomasVotruba c011720d4f add param name to docs 2020-02-23 21:58:25 +01:00
TomasVotruba 671fa8a547 [Phalcon] Add DecoupleSaveMethodCallWithArgumentToAssignRector 2020-02-23 20:16:45 +01:00
TomasVotruba 09d8c406a7 improve complexity 2020-02-23 20:02:02 +01:00
TomasVotruba 77d94c41a9 improve EregToPcreTransformer complexity 2020-02-23 18:57:05 +01:00
TomasVotruba 8347a4c784 [JMS] Add RemoveJmsInjectParamsAnnotationRector and RemoveJmsServiceAnnotationRector 2020-02-23 18:44:19 +01:00
TomasVotruba 6ba1d212e0 require at least 2 iffs for nested foreach 2020-02-23 17:05:59 +01:00
TomasVotruba cef900323f add add ShortNameAwareTagInterface 2020-02-23 16:14:23 +01:00
TomasVotruba eeb43d2b01 rector ci: enable solid + fix class const privatization for using parent 2020-02-23 16:03:39 +01:00
TomasVotruba 735be73800 [SOLID] Add ChangeNestedForeachIfsToEarlyContinueRector 2020-02-22 16:04:15 +01:00
TomasVotruba 93633a4c04 [CodeQuality] Add InlineIfToExplicitIfRector 2020-02-22 13:07:36 +01:00
TomasVotruba 4d9a689431 fix name equal 2020-02-22 11:49:51 +01:00
Aerendir aa655dbee3 Support throw from the method of an instantiated class. 2020-02-21 23:54:23 +01:00
TomasVotruba bc24bb12ff prevent getName() on StaticCall or MethodCall 2020-02-21 16:41:33 +01:00
TomasVotruba d0afc945e0 add links to each rule and test fixture in docs 2020-02-21 15:24:17 +01:00
TomasVotruba 5318f7c8d1 Fix incorrect regexes to preserve doc tags spacing 2020-02-21 14:49:50 +01:00
TomasVotruba 1e83e78a5e fix duplicate switch without break 2020-02-21 13:37:27 +01:00
TomasVotruba 0e61d7e96f [CodingStyle] Add CamelCaseFunctionNamingToUnderscoreRector 2020-02-21 02:50:54 +01:00
TomasVotruba 99eeeabee2 fix nested array dim fetch resolving type 2020-02-21 01:52:45 +01:00
TomasVotruba 40cd751756 keep array function static 2020-02-21 00:40:35 +01:00
Tomas Votruba ec50ab5672
Merge pull request #2890 from Aerendir/AnnotateThrowables-support-static-methods
#2861: Support throw of static methods
2020-02-20 19:49:39 +01:00
Aerendir 3e3445a255 Closes #2889. Support static methods calls. 2020-02-20 17:16:30 +01:00
TomasVotruba 01bd2e3d86 skip test fixtures 2020-02-19 14:53:21 +01:00
TomasVotruba 9da97ed1f6 update alias 2020-02-19 14:36:10 +01:00
TomasVotruba 7f63457a18 Fix already constant 2020-02-19 14:35:30 +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
Tomas Votruba 36ffd47763
Merge pull request #2876 from Aerendir/AnnotateThrowables-improve-tests-organization
`AnnotateThrowablesRector`: Improve organization of tests.
2020-02-18 18:59:06 +01:00
Tomas Votruba b65a200400
Merge pull request #2883 from alfredbez/oxid-replace-deprecated-classes
[OXID] replace backwards-compatability classes in oxNew
2020-02-18 18:06:15 +01:00
alfredbez 2cd3761661 added rector to replace oxid backwards-compatability classes 2020-02-18 12:10:03 +01:00
Felix Sokoliuk bd5e0adeac skip node when nested ternary is not a BinaryOp 2020-02-18 06:48:28 +01:00
Felix Sokoliuk cd263606c9 add test case for non binary op nested ternary 2020-02-18 06:45:43 +01:00
Aerendir 082a3061bf Fix mispelled `Docblock`. 2020-02-17 17:00:37 +01:00
Aerendir 15f97ae2f3 `AnnotateThrowablesRector`: Improve organization of tests. 2020-02-17 16:52:59 +01:00
TomasVotruba 5a28cd22d5 Skip unpackaged args in ArraySpreadInsteadOfArrayMergeRector 2020-02-17 15:17:39 +01:00
TomasVotruba e9897408b6 make test pass 2020-02-17 01:54:02 +01:00
TomasVotruba 868a56ad5a fix test location 2020-02-17 01:52:05 +01:00
TomasVotruba 5ebf2414c4 fix remove alwasy else for anonymous function jump 2020-02-17 01:24:19 +01:00
Tomas Votruba 655478265c
Merge pull request #2862 from escopecz/remove-always-elase-anonymous-function
Adding failing test for RemoveAlwaysElseRector
2020-02-17 00:55:40 +01:00
TomasVotruba dfd75bea94 improve ci 2020-02-17 00:45:00 +01:00
TomasVotruba 1498108d95 fix single line comment 2020-02-17 00:03:28 +01:00
John Linhart 54302369f1 Moving test into a separate file 2020-02-16 19:47:26 +01:00
TomasVotruba 4986d0ab7d respect parent definition in AddArrayReturnDocTypeRector 2020-02-16 19:13:41 +01:00
TomasVotruba 6d0e77fe1a skip traits in CountOnNullRector 2020-02-16 19:07:37 +01:00
TomasVotruba 895f09b150 fix paths 2020-02-16 18:42:57 +01:00
Tomas Votruba 58df5c5f31
Merge pull request #2859 from rectorphp/const-property
Apply properties to constants rule from SOLID
2020-02-16 17:51:17 +01:00
TomasVotruba d1b4779889 apply properties to constants rule from SOLID 2020-02-16 17:47:00 +01:00
John Linhart facca2a50b Adding failing test for RemoveAlwaysElseRector
With a foreach within an anonymous function
2020-02-15 15:26:41 +01:00
Aerendir f734a93272 Make `AnnotateThrowablesRector` continue on unhandled node types. 2020-02-15 00:56:09 +01:00
TomasVotruba 77c9d2924e remove duplicated tests 2020-02-14 23:53:37 +01:00
TomasVotruba 69c18b87ca fix fixtures 2020-02-14 23:50:42 +01:00
TomasVotruba 1c273c902c fix namespace 2020-02-14 23:48:53 +01:00
TomasVotruba 401d0aeaf6 fix namespaces, fixtures, add getThrowsTypes() 2020-02-14 23:35:40 +01:00
TomasVotruba 3bb87fcc1c correct location 2020-02-14 21:20:46 +01:00
TomasVotruba 00a3fb3a17 [SOLID] Add ChangeReadOnlyPropertyWithDefaultValueToConstantRector 2020-02-14 17:08:51 +01:00
TomasVotruba 1881f534de fixup! [DeadCode] Add RemoveDeadTryCatchRector 2020-02-14 15:48:45 +01:00
TomasVotruba af90cba019 [DeadCode] Add RemoveDeadTryCatchRector 2020-02-14 15:48:45 +01:00
TomasVotruba bf722ad9b5 move nette to rules 2020-02-14 10:51:33 +01:00
TomasVotruba 4e37157a88 fix non-Rector locations 2020-02-13 23:44:04 +01:00
TomasVotruba 86bcb6eb7b fix cs 2020-02-13 22:48:16 +01:00
TomasVotruba e564834329 docs link to the top to find quickly 2020-02-13 17:16:13 +01:00
TomasVotruba 42c5141d70 [Renaming] Add RenameFuncCallToStaticCallRector 2020-02-13 17:12:38 +01:00
TomasVotruba 09cf6f8a4a move core architecture to own set 2020-02-13 14:44:36 +01:00
TomasVotruba 13aff11638 fix statis int/float in ereg transformer 2020-02-13 11:10:09 +01:00
TomasVotruba 11f401daf9 fix ChangeQuerySetParametersMethodParameterFromArrayToArrayCollection location 2020-02-13 11:09:07 +01:00
TomasVotruba bc5eefdb76 improve AddSeeTestAnnotationRector 2020-02-11 14:40:59 +01:00
TomasVotruba 4aac338d20 improve ParamTypeDeclarationRector complexity 2020-02-11 14:11:47 +01:00
TomasVotruba 3e5dd77bb6 move Rector-rule based packages from /packages to /rules 2020-02-11 13:41:37 +01:00