Commit Graph

883 Commits

Author SHA1 Message Date
Tomas Votruba 811311089b Updated Rector to commit 6daf93e54524b24be9b2d79edca98d97b6c2ae32
6daf93e545 [NodeAnalyzer] Remove find first previous on CallAnalyzer (#4434)
2023-07-07 16:13:45 +00:00
Tomas Votruba 4ded5a660a Updated Rector to commit 9df1445de8c8cb5eed5a85446628226f9b03ed76
9df1445de8 [DX] Remove SimplifyForeachToArrayFilterRector as it turns typed functions to string and make code worse (#4424)
2023-07-05 15:32:48 +00:00
Tomas Votruba 6981c70c9a Updated Rector to commit 9ed8c21b127cdd45a28307d5fc41668f867f4ef4
9ed8c21b12 [DeadCode] Remove findFirstPrevious() usage on UselessIfCondBeforeForeachDetector (#4388)
2023-07-01 09:41:56 +00:00
Tomas Votruba d90547ba8c Updated Rector to commit 14d5c18788067f9f75fe234071814aabf42c41b1
14d5c18788 Fix just assigned variable in InlineArrayReturnAssignRector (#4363)
2023-06-27 10:06:39 +00:00
Tomas Votruba ff810186aa Updated Rector to commit a653146486eea313a569bd84a19e6ebaec7015d9
a653146486 avoid including copiler extension stub
2023-06-27 09:04:22 +00:00
Tomas Votruba 9ce469b35c Updated Rector to commit f5a5780031301ae8678d92c28ca537bf70951498
f5a5780031 [CodeQuality] Use AbstractRector on ForeachItemsAssignToEmptyArrayToAssignRector (#4336)
2023-06-24 09:24:54 +00:00
Tomas Votruba aa8fe10881 Updated Rector to commit e80557a0c438d589759e9bb1c2026ebedaba401e
e80557a0c4  [CodeQuality] Skip not regex on SimplifyRegexPatternRector  (#4322)
2023-06-22 19:58:23 +00:00
Tomas Votruba a9747ba209 Updated Rector to commit 78475f89ad4c6e06ad1ed1a7c94858e52cfa63b3
78475f89ad  [CodeQuality] Remove parent lookup on LocalPropertyAnalyzer  (#4295)
2023-06-19 20:14:17 +00:00
Tomas Votruba 8bb866241c Updated Rector to commit 253b4f6e866fbdcd7381d22ea84f17005b233bfb
253b4f6e86 [CodeQuality] Remove parent lookup on ForeachItemsAssignToEmptyArrayToAssignRector (#4292)
2023-06-19 18:40:02 +00:00
Tomas Votruba 852d73ba40 Updated Rector to commit ad41e8a6cf9c319bc25ef3d6b6b47643edc76499
ad41e8a6cf [CodeQuality][Performance] Reduce repetitive NodeTypeResolver->getType() on ExprBoolCaster (#4279)
2023-06-18 14:30:25 +00:00
Tomas Votruba 09e844dec2 Updated Rector to commit c8e7963c048c61053f98c2aaa5690891cecc884e
c8e7963c04 [CodeQuality][Performance] Using STOP_TRAVERSAL in traverseNodesWithCallable() in LocallyCalledStaticMethodToNonStaticRector (#4278)
2023-06-18 14:04:18 +00:00
Tomas Votruba 5a6b4888cf Updated Rector to commit e87ee7e0b358fcbdb752bac8ec8b870dde54a7d3
e87ee7e0b3 Move LocallyCalledStaticMethodToNonStaticRector to CodeQuality namespace, to avoid dumping removed static set (#4242)
2023-06-16 14:09:13 +00:00
Tomas Votruba 688a917dc7 Updated Rector to commit dfa6e776ea2e94e9535af72e14d94d6ec984361e
dfa6e776ea [CodeQuality] Reduce parent lookup for inside Closure BindTo on LocalPropertyAnalyzer (#4231)
2023-06-14 15:11:07 +00:00
Tomas Votruba 6380eb68ac Updated Rector to commit e55d6b32a785bd03635fffc9093e26e61e33d67c
e55d6b32a7 [CodeQuality] Reduce parent lookup for inside Closure Bind (#4230)
2023-06-14 14:59:42 +00:00
Tomas Votruba 4c28e357ca Updated Rector to commit 20ec11e73d8998f9ad7533c8f179ee7be8e2abdf
20ec11e73d [Docblock] Move DocBlockUpdater service usage from AbstractRector to PhpDocTypeChanger (#4215)
2023-06-14 04:39:10 +00:00
Tomas Votruba f440a692d3 Updated Rector to commit 7a61135453ff9fa595966f0265cb2a3c28c13656
7a61135453 [CodeQuality] Remove direct return STOP_TRAVERSAL on SetTypeToCastRector (#4187)
2023-06-12 09:19:31 +00:00
Tomas Votruba 503a6059f8 Updated Rector to commit a8922f7431c9c9188be501107ee7819e0130da4c
a8922f7431 skip temporarily match + throws downagrade in symfony/console, very unlikely to run
2023-06-11 23:01:39 +00:00
Tomas Votruba 3313a231b7 Updated Rector to commit bb609b28e327ca1fb7827b6bc548013d19a2cf4e
bb609b28e3 [Core] Always reset stopTraversal to false on next Rector visit (#4182)
2023-06-11 14:17:34 +00:00
Tomas Votruba a48c21e135 Updated Rector to commit ebfe96b4e08b26439c2341cd45e87a7bc5f314fb
ebfe96b4e0 Drop AttributeKey::SCOPE in ClassMethodReturnTypeOverrideGuard (#4144)
2023-06-09 17:30:44 +00:00
Tomas Votruba 74feb951d2 Updated Rector to commit 7740446b9569f8e03f64dedf4e1330fe52b98b3e
7740446b95 Drop AttributeKey::SCOPE in RemoveUnusedVariableAssignRector (#4141)
2023-06-09 17:06:55 +00:00
Tomas Votruba ad74348451 Updated Rector to commit 390730a9c40cfad8ca6a089e2dee1b7e158e076e
390730a9c4 Remove propperty to add collector, add them directly or as a constructor dependency (#4131)
2023-06-09 10:52:53 +00:00
Tomas Votruba 2c295def16 Updated Rector to commit 82687502deb9d41ed79ed832baa09fe23f90d3f8
82687502de Avoid parent node lookup in RemoveEmptyClassMethodRector (#4129)
2023-06-08 23:05:51 +00:00
Tomas Votruba 08a4332d59 Updated Rector to commit 059783fb07cbe5bd2259d4634d32f563ce862de0
059783fb07 Remove MethodCallToMethodCallRector as unused (#4128)
2023-06-08 22:54:12 +00:00
Tomas Votruba f82e30a026 Updated Rector to commit ae874efa148e6d5a031503892a6307824b4d7003
ae874efa14 Remove SourceLocatorProviderInterface as unused (#4126)
2023-06-08 22:00:17 +00:00
Tomas Votruba f486676c12 Updated Rector to commit 16b60d0f84d824f2eaafadd52650bd4ea84798e5
16b60d0f84 Make ConvertStaticPrivateConstantToSelfRector work for non-final classes, make part of code-quality set (#4114)
2023-06-08 14:55:39 +00:00
Tomas Votruba 9e103260ec Updated Rector to commit 2f3e9be0ae108c75f9de8fbf2ea92f0393ad9839
2f3e9be0ae [DX] Test BetterNodeFinder with Laravel container (#4106)
2023-06-08 14:23:03 +00:00
Tomas Votruba 4e35c1eafd Updated Rector to commit 2d174631c410c5ec1767a28905206e2e678b546b
2d174631c4 [CodeQuality] Handle return new object and no return on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector (#4112)
2023-06-08 10:08:29 +00:00
Tomas Votruba 87fdd5999d Updated Rector to commit 63816c03ac4b36a7fdaa28b5944a8fca9f9ed6b8
63816c03ac [CodeQuality] Handle throw after if on ConsecutiveNullCompareReturnsToNullCoalesceQueueRector (#4107)
2023-06-07 14:47:58 +00:00
Tomas Votruba 1fdcfc8e63 Updated Rector to commit 3c9a2453294bed3e258935aad37d355c8251db4f
3c9a245329 Make SimplifyRegexPatternRector work without parent nodes + deprecate BetterNodeFinder and findParent* methods (#4105)
2023-06-07 12:49:26 +00:00
Tomas Votruba fc28a000c6 Updated Rector to commit cdc9e6b6d8ce2446e8860016997ad37e8d3b7d44
cdc9e6b6d8 Remove ArrayKeysAndInArrayToArrayKeyExistsRector as narrow, does not check variable usage and might be on purpose (#4084)
2023-06-05 13:46:42 +00:00
Tomas Votruba 5edc8437c3 Updated Rector to commit 0e9192f70cc10e4684adec85a0ab5f67c6afcad3
0e9192f70c Remove deprecated UnionTypesRector and NarrowUnionTypeDocRector, use strict-based rules from TypeDeclaration set instead (#4069)
2023-06-04 21:38:22 +00:00
Tomas Votruba 18f8207b59 Updated Rector to commit 861022a70bd9f9c8b91f20c7dfacb0d297d33e9a
861022a70b Remove RemoveAlwaysTrueConditionSetInConstructor, as overly specific and not practical; better handle with PHPStan (#4065)
2023-06-04 17:57:18 +00:00
Tomas Votruba 335ab50008 Updated Rector to commit 2d99c8b3661934f33155ddb5d46e62c7ba14715a
2d99c8b366 Remove removeNode() from InlineConstructorDefaultToPropertyRector (#4062)
2023-06-04 17:26:50 +00:00
Tomas Votruba a82d8260db Updated Rector to commit c9fc74baf53ce9104403c492fcd13dec435dad9c
c9fc74baf5 [CodeQuality] Skip deep append in if foreach before on ForeachItemsAssignToEmptyArrayToAssignRector (#4053)
2023-06-03 00:54:04 +00:00
Tomas Votruba 7823920f86 Updated Rector to commit 069e53a00efd322e8ab32b91938df894690b475c
069e53a00e [CodeQuality] Skip multiple assigns append before foreach on ForeachItemsAssignToEmptyArrayToAssignRector (#4052)
2023-06-02 22:04:35 +00:00
Tomas Votruba 1f621e91a4 Updated Rector to commit 88eed987cc361166359c158ffd22d264d165aa8b
88eed987cc Ensure check isFirstClassCallable() before node->getArgs() on CallLike (#4049)
2023-06-02 12:32:12 +00:00
Tomas Votruba 58a4ff85e7 Updated Rector to commit b8a0e84efade3cf6164e6d239bf91aefc4678ae5
b8a0e84efa Skip StrvalToType for strval first class callable syntax (#4046)
2023-06-02 10:12:23 +00:00
Tomas Votruba 8f92523b3a Updated Rector to commit 965b5f72045e3a94adf1eab83accafb52bfbe92a
965b5f7204 [CodeQuality] Exclude first class callable from IntvalToTypeCastRector (#7962) (#4040)
2023-06-01 22:33:20 +00:00
Tomas Votruba 9a2931cbe4 Updated Rector to commit bdc2fc99631f67eeb2d96e2cf0906279c2561c9a
bdc2fc9963 [NodeManipulator] Remove parent lookup on PropertyFetchAssignManipulator (#4037)
2023-06-01 08:56:46 +00:00
Tomas Votruba 485a9df50b Updated Rector to commit a91057e5a1f14fe12a1e9bded2c006012c09b00d
a91057e5a1 Remove PARENT_NODE from ArrayDimFetchTypeResolver (#4015)
2023-05-29 09:58:15 +00:00
Tomas Votruba b403b25ebd Updated Rector to commit 1f594c05a70e6a8a40f15503644ed86a75bbc5f9
1f594c05a7 [CodeQuality] Remove parent attribute on LocalPropertyAnalyzer (#4007)
2023-05-28 21:32:40 +00:00
Tomas Votruba 1e426f9497 Updated Rector to commit cc6dc93b566930e66b61ee04205ef943a8d9d339
cc6dc93b56 [CodeQuality] Reduce parent lookup on LocalPropertyAnalyzer::resolveFetchedPropertiesToTypesFromClass() (#4004)
2023-05-28 20:47:12 +00:00
Tomas Votruba d3dfbb4638 Updated Rector to commit 2f84187dc1d6db09788adf8346339d6854902db5
2f84187dc1 Remove RenameNamespaceRector, better handle by IDE or explicit RenameClassRector (#3979)
2023-05-26 21:28:23 +00:00
Tomas Votruba d8c877db45 Updated Rector to commit 33d05d3b9ee7838d254edf58dbd05a355891b48b
33d05d3b9e Refactor RenameVariableToMatchMethodCallReturnTypeRector to StmtsAwareInterface (#3977)
2023-05-26 14:00:49 +00:00
Tomas Votruba 94c1b64b7e Updated Rector to commit 18ac565714b7b66506a901ed4787d1ffbdd0af2d
18ac565714 Refactor from PARENT_NODE in EncapsedStringsToSprintfRector (#3960)
2023-05-25 13:47:07 +00:00
Tomas Votruba f7d28cee5d Updated Rector to commit 794bc8b5484e3eafcc91f85d443f665565c4ad44
794bc8b548 Remove PARENT_NODE from ForeachItemsAssignToEmptyArrayToAssignRector (#3958)
2023-05-25 09:21:23 +00:00
Tomas Votruba 26ac08e306 Updated Rector to commit fa6f1f67578dbe765fc13abaa294e0f62e66d4a8
fa6f1f6757 [CodeQuality] Remove ExplicitMethodCallOverMagicGetSetRector designed for nette smart object migration only, not useful for general projects (#3948)
2023-05-24 12:27:19 +00:00
Tomas Votruba 50ec3d44e9 Updated Rector to commit eef0e5d1f47500c9f56c5ccaa16523b11b47c8a7
eef0e5d1f4 Refactor PARENT_NODE away from JoinStringConcatRector (#3947)
2023-05-24 12:18:40 +00:00
Tomas Votruba 96fc00fd8e Updated Rector to commit 3c69a0f9d7b075cef7e0e382eee94234f3629efa
3c69a0f9d7 Remove AddPregQuoteDelimiterRector as very narrow area and has not context awareness, better handle manually (#3927)
2023-05-22 13:43:31 +00:00
Tomas Votruba 5f824909cb Updated Rector to commit 79ffda7d8537ca6b04e14082bd9f0091fb97215d
79ffda7d85 Remove PARENT_NODE from CountOnNullRector (#3924)
2023-05-22 13:31:04 +00:00
Tomas Votruba 8724ff4d63 Updated Rector to commit 392d81f7b01253711f7aa48344673b5f01b1c325
392d81f7b0 [DeadCode] Remove RemoveDuplicatedIfReturnRector as can lead to unexpeced consequences, better use static analysis and contextual handling (#3926)
2023-05-22 13:11:03 +00:00
Tomas Votruba 7eb9eec801 Updated Rector to commit 6c3f2cdf953587cdf0945c7fb6c05fd0083c25fc
6c3f2cdf95 [DX] Deprecate parent node attribute, allow return of NodeTraverser::* in refactor() method (#3922)
2023-05-22 10:21:31 +00:00
Tomas Votruba ab18d95c87 Updated Rector to commit e1f19806fb24f507172f8e8b17ebd51c159b3fe6
e1f19806fb Remove NEXT_NODE from SimplifyIfReturnBoolRector (#3915)
2023-05-21 15:34:58 +00:00
Tomas Votruba 3f89b13d0e Updated Rector to commit 16f3c961ead671df489ff9217d61cdfe40e09ec0
16f3c961ea [CodeQuality] Add typed property support to IssetOnPropertyObjectToPropertyExistsRector (#3876)
2023-05-17 08:38:16 +00:00
Tomas Votruba 0b0fda9095 Updated Rector to commit 99bdd27c00f0a27620f75eeeedc36bb3d505456b
99bdd27c00 [CodeQuality] Remove next attribute usage on SimplifyIfNullableReturnRector (#3866)
2023-05-16 05:46:08 +00:00
Tomas Votruba 8dce3beed1 Updated Rector to commit c4bab4a7778e11715d720391c5daaa7a89e975ce
c4bab4a777 Remove next from ExplicitBoolCompareRector (#3857)
2023-05-15 12:33:28 +00:00
Tomas Votruba 89439d883f Updated Rector to commit 95b1789a871adeb6b6555949d3cf32b0b4060613
95b1789a87 Drop AttributeKey::SCOPE in ArrayCallableMethodMatcher (#3835)
2023-05-15 08:51:25 +00:00
Tomas Votruba 18b46b9b72 Updated Rector to commit 656836093ea0abd96860af062fdf6f67afe1f504
656836093e [CodeQuality] Deprecate NarrowUnionTypeDocRector as focused on docblocks, and moving to type declarations (#3848)
2023-05-14 15:57:29 +00:00
Tomas Votruba 33a05b3e73 Updated Rector to commit 07a7876d8a4c93097c966730acbc4aeb7d9e1765
07a7876d8a [CodingStyle] Remove OrderAttributesRector, as rather coding standard and does not have specific PSR example (#3838)
2023-05-14 13:22:44 +00:00
Tomas Votruba f613b7a98a Updated Rector to commit 499fdbc3af1779929444c170a778678e28be957a
499fdbc3af Drop AttributeKey::SCOPE in various classes (#3836)
2023-05-14 10:01:33 +00:00
Tomas Votruba 722cf05380 Updated Rector to commit 2406dc813a3eba3e25522fcb69af879fbc4a60cd
2406dc813a [Traverser] Add ByRefReturnNodeVisitor (#3826)
2023-05-13 18:07:42 +00:00
Tomas Votruba da149bb5b0 Updated Rector to commit 645071a650fc50d7e084378facaebcc868a52ba1
645071a650 Add test fixture for sprintf number + make use of getArgs() to get always an Arg type (#3822)
2023-05-13 17:20:02 +00:00
Tomas Votruba 26bbf728d6 Updated Rector to commit d8da061308902cf4ef7a30963d5c9f32b6b9ec02
d8da061308 Make SimplifyIfNullableReturnRector + ChangeNestedIfsToEarlyReturnRector work without next/prev (#3794)
2023-05-11 11:52:57 +00:00
Tomas Votruba 8afa5f961e Updated Rector to commit 074b1781b3fa7c7e23470c57ab85c0bd5fe0bfd2
074b1781b3 Remove RemoveUnusedVariableAssignRector, as could be breaking code in order of excution and hard to do reliable (#3793)
2023-05-11 07:56:32 +00:00
Tomas Votruba 2cb797e1b1 Updated Rector to commit 11b278ca27f23ba4a2c55df877664fc23413a81d
11b278ca27 [CodeQuality] Remove SimplifyUselessLastVariableAssignRector as overly complex and should be handled individually (#3784)
2023-05-10 07:10:45 +00:00
Tomas Votruba 2cad3fa15d Updated Rector to commit 76da9489fe16c5854d5fed29b81197940025e975
76da9489fe Make ConsecutiveNullCompareReturnsToNullCoalesceQueueRector use of StmtsAwareInterface (#3783)
2023-05-10 06:07:59 +00:00
Tomas Votruba 6da6d1d775 Updated Rector to commit 89bc4d80f5dd4c7e81a616c8b58a921a1470a47b
89bc4d80f5 Make use of StmtsAwareInterface (#3781)
2023-05-10 05:18:05 +00:00
Tomas Votruba 8af1a1213f Updated Rector to commit 1e052f588331717f87a8d610db6eb7f89f8690d3
1e052f5883 [cleanup] Make use of getArgs(), remove ignored from phpstan (#3771)
2023-05-08 12:54:32 +00:00
Tomas Votruba af500df8f4 Updated Rector to commit f6c4edcd0c3feaad4abc075bae39474ac34bb82d
f6c4edcd0c [CodeQuality] Add CleanupUnneededNullsafeOperatorRector (#3767)
2023-05-08 10:34:10 +00:00
Tomas Votruba 39697489d4 Updated Rector to commit 5a32ed95b75b179e77c14a83a65f2eff1f1474b8
5a32ed95b7 [cleanup] Make use of getArgs(), remove ignores from phpstan.neon (#3770)
2023-05-08 10:34:06 +00:00
Tomas Votruba 930a1a2ba2 Updated Rector to commit 2d583eba1512d3b51e79503eba46466a32cb7374
2d583eba15 [cleanup] Make use of getArgs() (#3769)
2023-05-08 07:49:33 +00:00
Tomas Votruba a2c39b778e Updated Rector to commit 13d81f90894396f7e443cb5cb9198aeacb6bc05a
13d81f9089 [Cleanup] Make use of getArgs() directly (#3766)
2023-05-08 07:37:37 +00:00
Tomas Votruba 4bf474e653 Updated Rector to commit be53013ca3dff5b3eca8cdb3e688d744585e2557
be53013ca3 [CodeQuality] Remove SimplifyIfExactValueReturnValueRector, as overly defensive + InlineSimplePropertyAnnotationRector as purely coding standard area (#3764)
2023-05-07 19:35:01 +00:00
Tomas Votruba 5a5e7223f6 Updated Rector to commit ce46293db40c0f89be5119215f71e5c1a11ad215
ce46293db4 Defer type-resolving in ForeachToInArrayRector (#3756)
2023-05-07 19:04:44 +00:00
Tomas Votruba 546e7840f2 Updated Rector to commit 0f07aacd8626af970d2f60b911ba89259482d387
0f07aacd86 Defer type-resolving in TernaryEmptyArrayArrayDimFetchToCoalesceRector (#3758)
2023-05-07 19:02:37 +00:00
Tomas Votruba 83ad95142a Updated Rector to commit eee943bb0f4c83e7c016100c330b31ed3c9746c5
eee943bb0f Defer type-resolving in UseIdenticalOverEqualWithSameTypeRector (#3755)
2023-05-07 19:02:29 +00:00
Tomas Votruba fdffd78f22 Updated Rector to commit b44e008ed374f3c7f80974ef037e9236499d11d7
b44e008ed3 Defer type-resolving in AssignVariableTypeResolver (#3759)
2023-05-07 18:59:42 +00:00
Tomas Votruba 2f18a080f8 Updated Rector to commit ca36485a2e8abbdb36873d55a59676080be306ed
ca36485a2e Defer type-resolving in SimplifyBoolIdenticalTrueRector (#3757)
2023-05-07 18:57:49 +00:00
Tomas Votruba da6f698ff7 Updated Rector to commit 14fa8c914b12bfc6a4112d77e03057dab9b90cd4
14fa8c914b Cleanup phpstan errors (#3748)
2023-05-06 22:11:26 +00:00
Tomas Votruba e7d9598446 Updated Rector to commit 3c592b05dc0aa78702a4b38d39711d78c404e279
3c592b05dc [CodeQuality] Remove ForToForeachRector, as overly deatiled and not reliable (#3747)
2023-05-06 21:47:33 +00:00
Tomas Votruba d4a1cc70d1 Updated Rector to commit a3ea0cf7f46febb04f26db608463d791d9d98933
a3ea0cf7f4 [CodeQuality] Skip non-array type on SimplifyForeachToArrayFilterRector (#3738)
2023-05-06 11:33:17 +00:00
Tomas Votruba 4628b8b0cd Updated Rector to commit 657ec2e5af81361107cafc9c842b1d9cdf4ed760
657ec2e5af Fix ExplicitMethodCallOverMagicGetSetRector with a protected method (#3732)
2023-05-04 18:14:42 +00:00
Tomas Votruba 940a47a580 Updated Rector to commit 1e085a0c5a47243c624c46ff7397a80bf983f776
1e085a0c5a [CodeQuality] Improve SimplifyIfElseToTernaryRector performance (#3721)
2023-05-01 13:51:24 +00:00
Tomas Votruba 65abab80de Updated Rector to commit 5c1be93b80c3f7bfd8bd158ba0a55501a7acaefc
5c1be93b80 PHP 8.2 is supported (#3717)
2023-05-01 01:36:32 +00:00
Tomas Votruba d73b4dcf29 Updated Rector to commit 92a992ef6e5c5350a0e6de2b4e844e21f072fb1b
92a992ef6e [NodeManipulator] Clean up AssignManipulator take 2 (#3696)
2023-04-28 10:15:23 +00:00
Tomas Votruba a4e6a42d08 Updated Rector to commit 14b6073057861d5547610084eb59a7b1826d2ad8
14b6073057 [CodeQuality] Using local variable  on NarrowUnionTypeDocRector (#3697)
2023-04-28 09:53:28 +00:00
Tomas Votruba a93a36635a Updated Rector to commit fb89e317c52fb8a16e2db18edb80172adb17014e
fb89e317c5 [TypeDeclaration] Add WhileNullableToInstanceofRector (#3680)
2023-04-24 11:18:26 +00:00
Tomas Votruba 3e22fca2fe Updated Rector to commit add55824f64b4b597a6b3bc3feb9a557708ace00
add55824f6 Fix SingleInArrayToCompareRector if array item is variadic (#3640)
2023-04-21 12:00:51 +00:00
Tomas Votruba d784926da7 Updated Rector to commit 79a630987e9afffb7edda0380099472b04f2e211
79a630987e [Performance] Using findFirst() for cast to (bool) so no need search all found nodes (#3642)
2023-04-21 04:11:14 +00:00
Tomas Votruba 1cb1664849 Updated Rector to commit f08216fc30ced0d29868a18cd1c2504a1a10ecd0
f08216fc30 [CodeQuality] Skip with break on SwitchTrueToIfRector (#3634)
2023-04-20 00:27:18 +00:00
Tomas Votruba ab279ddabc Updated Rector to commit edf54c85b6aadaecf064b797d340953697e0ca74
edf54c85b6 [Instanceof] Add FlipNegatedTernaryInstanceofRector (#3610)
2023-04-13 10:40:34 +00:00
Tomas Votruba 3f1c0e6187 Updated Rector to commit 9629890a306844ba49ea6689d58fbecb67a7980e
9629890a30 Use isInteger() (#3593)
2023-04-09 00:51:38 +00:00
Tomas Votruba 2300088c0b Updated Rector to commit 08660ad7077c86c3c86e7d1cbd14d9d7d71cb450
08660ad707 Use isFloat() (#3594)
2023-04-09 00:39:59 +00:00
Tomas Votruba a03a19aeca Updated Rector to commit 273e4b43f1dbe84d426f4db5ab7ea9b0b1fea190
273e4b43f1 Use isBoolean() (#3591)
2023-04-08 16:37:58 +00:00
Tomas Votruba 3da290e4ab Updated Rector to commit dbb0e196a43d8c14a9de6abeef8fe081e95c51c2
dbb0e196a4 Revert all is* changes (#3584)
2023-04-08 13:25:07 +00:00
Tomas Votruba 9d60770133 Updated Rector to commit e66317aeb276bb0b544e7b4b55057c9dab5fbb73
e66317aeb2 fix cs (#3579)
2023-04-08 11:32:12 +00:00
Tomas Votruba aaddfe2522 Updated Rector to commit 59cdfc8d814b094bffd814f4679c828cd45c7ec9
59cdfc8d81 Use isInteger() (#3571)
2023-04-08 01:19:54 +00:00
Tomas Votruba e7c7a40197 Updated Rector to commit 437cc5aa660262603343cdbb193e0a54abf9037e
437cc5aa66 Use isBoolean() (#3570)
2023-04-08 01:12:35 +00:00
Tomas Votruba be3c7cb235 Updated Rector to commit 46301c10a803d2b6727270a738e8c9c297b0b10c
46301c10a8 Use isFloat() (#3572)
2023-04-08 00:59:02 +00:00
Tomas Votruba 75f99e1dc0 Updated Rector to commit a36a4d9fcb244d5d49a45255d9581a16410dff7a
a36a4d9fcb Remove unused imports (#3567)
2023-04-05 19:01:37 +00:00
Tomas Votruba d7fe9b627b Updated Rector to commit 3cbf7104d0b81ba1b930ce9a4cd3456e1c082b43
3cbf7104d0 [CodeQuality] Skip empty cases on SwitchTrueToIfRector (#3556)
2023-04-02 21:45:54 +00:00
Tomas Votruba 4c6d730e14 Updated Rector to commit 58f00bfd68219a515d8ae49f2bbfcc6a55f8a575
58f00bfd68 [automated] Apply Coding Standard (#3550)
2023-04-02 00:35:49 +00:00
Tomas Votruba 9038a0d99c Updated Rector to commit 1a91d04c5256e451c744eeb848aaa0182dd227c5
1a91d04c52 [CodeQuality] Add cast scalar support on ReturnTypeFromStrictScalarRector (#3544)
2023-04-01 10:14:17 +00:00
Tomas Votruba 31bf5eb875 Updated Rector to commit 26e570f0d9f0a623cb315f58272f9b96161d3743
26e570f0d9 [CodeQuality] Add SwitchTrueToIfRector (#3535)
2023-03-29 07:34:40 +00:00
Tomas Votruba e96ee0ceef Updated Rector to commit 48f84c3acc91d32e4b0fb9bcb4785acd0e1bcad2
48f84c3acc [CodeQuality] Handle multiple ifs on SimplifyIfExactValueReturnValueRector (#3527)
2023-03-27 20:20:32 +00:00
Tomas Votruba 4e1a8b2170 Updated Rector to commit d2459d13d512d780cc22f7822bf630717d888969
d2459d13d5 [CodeQuality] Remove next node attribute usage on SimplifyIfNotNullReturnRector (#3517)
2023-03-25 05:15:57 +00:00
Tomas Votruba 0b3c5d9bcc Updated Rector to commit f22ddc8f18ef345d5e9c99cbb667548c3c854d7d
f22ddc8f18 Add not null compare to FlipTypeControlToUseExclusiveTypeRector (#3513)
2023-03-23 23:21:34 +00:00
Tomas Votruba d8c7bccf74 Updated Rector to commit 5d95d496e4a7583f355a228cca599cab60b09b41
5d95d496e4 [CodeQuality] Remove next node attribute usage on SimplifyIfExactValueReturnValueRector (#3511)
2023-03-23 19:16:38 +00:00
Tomas Votruba fd25bb9710 Updated Rector to commit 28e9cdb10785dc382ba2c9251cf1dde9024affa2
28e9cdb107 [CodeQuality] Skip with ascii on JoinStringConcatRector (#3497)
2023-03-21 02:20:08 +00:00
Tomas Votruba 7d0f151a40 Updated Rector to commit a2cd7283fbf2d6b2904016c51e3f4a545caa0256
a2cd7283fb Typo fix comment php 7.3 compat on rector workflow (#3432)
2023-03-01 13:00:30 +00:00
Tomas Votruba cf1958e570 Updated Rector to commit 2eac878f538ddd1e20346c14d402f7e93ee6033b
2eac878f53 [TypeDeclaration] Only apply false type on php 8.2+ configured on TypedPropertyFromAssignsRector (#3422)
2023-02-28 18:23:25 +00:00
Tomas Votruba f44d4bbee3 Updated Rector to commit b7b3a1dc2ea5c141aa1c48e626af10a31f832b77
b7b3a1dc2e [CodeQuality] Handle deep comments merged on ShortenElseIfRector (#3419)
2023-02-26 19:44:22 +00:00
Tomas Votruba 908a3c39d3 Updated Rector to commit 648a2f5ca994605a85e8f10279936a864eefc09c
648a2f5ca9 Fix BleedingEdgeIncludePurifier to use random value on temporary file to avoid crash (#3396)
2023-02-21 17:09:39 +00:00
Tomas Votruba 13aa217ffa Updated Rector to commit 208d52e2a160e8563ef94e2afc53239f8ecf55cf
208d52e2a1 [CodeQuality] Remove DoWhileBreakFalseToIfElseRector, rather manual static spot and refactoring (#3367)
2023-02-08 17:44:29 +00:00
Tomas Votruba f624d966b2 Updated Rector to commit 5c4a1212932dea9ca226abc55d480dbae2051562
5c4a121293 [CodeQuality] Skip has AllowDynamicProperties attribute on CompleteDynamicPropertiesRector (#3346)
2023-02-06 15:51:07 +00:00
Tomas Votruba 6f9bc2e5e6 Updated Rector to commit bac8c0691d7eee55e38924b49d7fac64f61456d8
bac8c0691d [CodeQuality] Mirror comment on ShortenElseIfRector (#3334)
2023-02-04 14:18:19 +00:00
Tomas Votruba 66cc09e8b6 Updated Rector to commit d118ae38e265476684bcf566b87301cca5716ed9
d118ae38e2 Use phpstan-deprecation-rules (#3330)
2023-02-02 09:24:12 +00:00
Tomas Votruba 64a999931a Updated Rector to commit 76a6df8f8ddc9f1aab255783498f28714b36140e
76a6df8f8d [Php81] Skip ReadonlyProperty for class that consume Trait with Property (#3314)
2023-01-29 02:02:55 +00:00
Tomas Votruba 01b8c03d60 Updated Rector to commit 8bf0045044d1357c6d10bc61e84fd962f69ccc20
8bf0045044 remove downgrade only method
2023-01-15 00:50:07 +00:00
Tomas Votruba 0fc42c2559 Updated Rector to commit 47fa234379b7b9f28081e8bc6e683628f8d53f2b
47fa234379 [CodeQuality] Add Variable support on class arg on InlineIsAInstanceOfRector (#3261)
2023-01-02 11:58:30 +00:00
Tomas Votruba 764b0a2692 Updated Rector to commit cb5b01223d46272004e947f122ae1e36d516f83a
cb5b01223d [automated] Re-Generate Nodes/Rectors Documentation (#3259)
2023-01-01 00:36:31 +00:00
Tomas Votruba 374d2f5b25 Updated Rector to commit f8814b1d707d72e284870759d1f446848fa003b2
f8814b1d70 [CodeQuality] Remove type addition on CompleteDynamicPropertiesRector (#3248)
2022-12-24 08:30:16 +00:00
Tomas Votruba 727b9f46f0 Updated Rector to commit bfa1891c50677b01136a9308fd3c3ecc12e267d9
bfa1891c50 [cleanup] Remove 73 unused public methods (#3245)
2022-12-23 17:10:25 +00:00
Tomas Votruba a5afc7b66c Updated Rector to commit 432d3e46a296babeea02c1e9d6633079011a303e
432d3e46a2 [NodeTraverser] Use NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN instead of NodeTraverser::DONT_TRAVERSE__CHILDREN (#3233)
2022-12-21 13:01:53 +00:00
Tomas Votruba 6025307990 Updated Rector to commit c80cd6f1f03f6f4e1b1aee6504126699e6a06fe3
c80cd6f1f0 [TypeCoverage] Add EmptyOnNullableObjectToInstanceOfRector (#3230)
2022-12-20 21:37:46 +00:00
Tomas Votruba 2adf37a5b5 Updated Rector to commit 36fcdc14e0828486c7a7a3ce8df723d712aeb2d7
36fcdc14e0 [CodeQuality] Add empty() check to FlipTypeControlToUseExclusiveTypeRector (#3224)
2022-12-20 14:53:37 +00:00
Tomas Votruba 311e5c0c0c Updated Rector to commit e895bceed66b12ddc80fcf90314ac576ae9efe4f
e895bceed6 [Core] Improve performance: remove repetitive currentFileProvider->setFile() call on PhpFileProcessor (#3213)
2022-12-17 13:44:41 +00:00
Tomas Votruba 33551cbeec Updated Rector to commit 21c9e59aaaae15e1baac98b80b6d3e3be5c5d88d
21c9e59aaa Adapt PrivateConstantToSelfRector to work on non-final classes, too (#3198)
2022-12-17 08:33:16 +00:00
Tomas Votruba 04232cb88d Updated Rector to commit d80ddd193deeebd47e765dfb58d300faaedc25b4
d80ddd193d [CodeQuality] Handle possible crash on ParametersAcceptorSelector::selectSingle() on OptionalParametersAfterRequiredRector (#3192)
2022-12-13 12:09:37 +00:00
Tomas Votruba 7924f6944c Updated Rector to commit de008767d91ad6cd5ed77bdc259454665e4bbde9
de008767d9 Replace static with self for private constants (#3178)
2022-12-12 12:29:16 +00:00
Tomas Votruba 7e4cd5dfba Updated Rector to commit bbd9d4fa2c6811c9c68984549d2c0dfb68232219
bbd9d4fa2c [CodeQuality] Skip non typed property no default value never assigned on SimplifyEmptyCheckOnEmptyArrayRector (#3171)
2022-12-08 10:16:49 +00:00
Tomas Votruba 0a53c32d58 Updated Rector to commit f8ad265fa5e4c58a4d0e973a73cac2c4e1efcb3f
f8ad265fa5 [CodeQuality] Handle BooleanNot on SimplifyEmptyCheckOnEmptyArrayRector (#3170)
2022-12-07 23:23:54 +00:00
Tomas Votruba 4397f883bd Updated Rector to commit 7636b888661966e3679770d868481cd02e31517f
7636b88866 [CodeQuality] Skip stdClass in IssetOnPropertyObjectToPropertyExistsRector, as always nested (#3166)
2022-12-07 15:29:56 +00:00
Tomas Votruba 83accd4a98 Updated Rector to commit efd09bbb400b2382be39effc206551e6964fa5ea
efd09bbb40 Compatibility with BetterReflection 6.x on ClassFromEnumFactory (#3150)
2022-12-04 13:15:14 +00:00
Tomas Votruba 091bb20142 Updated Rector to commit 139c19cbdf666ce3df7dea712faaf84772f19051
139c19cbdf Fix foreach key evaluation for SimplifyForeachToArrayFilterRector. (#3100)
2022-12-03 07:01:22 +00:00
Tomas Votruba ff75474d25 Updated Rector to commit 39f43c01cbc34a8bb064f056d39f1b8d2bd7a152
39f43c01cb Use Symfony ~6.1.x to avoid crash on update vendor-patch (#3134)
2022-12-01 14:10:32 +00:00
Tomas Votruba cc9387f91d Updated Rector to commit fdb9239a9f079bef34db3e0b864ebbc996022c12
fdb9239a9f [CodeQuality] Skip from non-typed param on SimplifyEmptyCheckOnEmptyArrayRector (#3115)
2022-11-28 10:39:45 +00:00
Tomas Votruba 8360fa1a7a Updated Rector to commit a8f322ad7e93f7902fca0a057e8d604482f71080
a8f322ad7e [Core] Remove BetterStandardPrinter::pStmt_Class() (#3072)
2022-11-17 10:44:46 +00:00
Tomas Votruba 4c8be8a104 Updated Rector to commit 07941b8f3dd7151db77df19243aed5c03a64cf63
07941b8f3d [SimplifyEmptyCheckOnEmptyArrayRector] Add new rule #7485 (#3069)
2022-11-16 15:33:33 +00:00
Tomas Votruba 18b5311e05 Updated Rector to commit fa9a953fc8df6d31c24b0415b177580f7edd4100
fa9a953fc8 [Php80] Skip possible numeric string switch cond with all integer case cond on ChangeSwitchToMatchRector (#3067)
2022-11-15 20:31:43 +00:00
Tomas Votruba b0ce719527 Updated Rector to commit 04257d3c76ee23722447433f07c8e5678ac9a07b
04257d3c76 Utilize Type->isArray() (#3065)
2022-11-15 15:22:43 +00:00
Tomas Votruba e05478f2e2 Updated Rector to commit e78e4727d513475187dae0300f78ef70043379f9
e78e4727d5 Utilize Type->isString() in rules/ (#3064)
2022-11-15 00:01:27 +00:00
Tomas Votruba bba6495f7d Updated Rector to commit 10346eea20d2222819f59b2ae994acc0948352e4
10346eea20 Apply node->isFirstCallable() check early before ->getArgs() when possible on CallLike (#3038)
2022-11-07 17:28:06 +00:00
Tomas Votruba ce3c134b0d Updated Rector to commit a5051ff31121d95ac2ccf7db351ea486024a0b3f
a5051ff311 Bump to PHPStan ^1.9.0 (#3033)
2022-11-04 07:12:49 +00:00
Tomas Votruba 1724f088d6 Updated Rector to commit 6902b17851f2b7172c0351e72cd1d4263684818f
6902b17851 InlineConstructorDefaultToPropertyRector fix code example (#7465) (#3028)
2022-11-02 00:04:20 +00:00
Tomas Votruba 6afda57164 Updated Rector to commit 9e4a9c0c25fbbd630cac07c9dab074f8dc9c54b8
9e4a9c0c25 [CodeQuality] Add TernaryEmptyArrayArrayDimFetchToCoalesceRector (#3027)
2022-11-01 19:57:56 +00:00
Tomas Votruba ddc864eff4 Updated Rector to commit 7b7d5a4b8bb61b52a298cbf941b7df131897f55b
7b7d5a4b8b Revert string specific identifier values on Type Mappers (#3024)
2022-11-01 14:15:38 +00:00
Tomas Votruba 0f38f3753c Updated Rector to commit af4cf28751f652d2ee1a8319d6cb39bf8614a1c1
af4cf28751 [DX] Use directly instanceof (#3021)
2022-10-28 10:16:48 +00:00
Tomas Votruba fe83c2a756 Updated Rector to commit 56620a9e3f49a1a71c6586752c9d5f67c0e7281c
56620a9e3f [CodeQuality] Skip different array_filter value on SimplifyEmptyArrayCheckRector (#3000)
2022-10-17 13:38:23 +00:00
Tomas Votruba cb2aa6330e Updated Rector to commit 71b1142ee41eceef21d9c3d3a1bf5bc4f67ad9d2
71b1142ee4 [CodeQuality] Skip different value left and right on SimplifyEmptyArrayCheckRector (#2998)
2022-10-17 09:13:38 +00:00