rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
https://getrector.com/find-rule?activeRectorSetGroup=phpunit
MIT License
64 stars 47 forks source link

[CodeQuality] Skip inline comment on DataProviderArrayItemsNewLinedRector #291

Closed samsonasik closed 11 months ago

samsonasik commented 11 months ago

array with inline comment should be skipped instead of re-printed, it currently produce invalid change:

     public function provideData(): array
     {
         return [
-            ['content123', 11], // a comment inline
+            ['content123', 11],
samsonasik commented 11 months ago

Fixed with verify next array item start line is equal with current array item line https://github.com/rectorphp/rector-phpunit/pull/291/commits/0aade184eaaf620717cfdd3079984d3cdcfc9b6a

samsonasik commented 11 months ago

All checks have passed 🎉 @TomasVotruba I am merging it ;)