-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Privatization] Do not remove comment on ChangeReadOnlyPropertyWithDe…
…faultValueToConstantRector (#3204) * [Privatization] Do not remove comment on ChangeReadOnlyPropertyWithDefaultValueToConstantRector * Fixed 🎉 * [ci-review] Rector Rectify * pin to phpstan/phpdoc-parser 1.15.0 * require pin phpstan/phpdoc-parser:1.15.0 as 1.15.1 got issue on array shape * require pin phpstan/phpdoc-parser:1.15.0 as 1.15.1 got issue on array shape Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
79a4c3a
commit dec1ddd
Showing
4 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ngeReadOnlyPropertyWithDefaultValueToConstantRector/Fixture/do_not_remove_comment.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture; | ||
|
||
class DoNotRemoveComment | ||
{ | ||
// some comment | ||
private $magicMethods = [ | ||
'__toString', | ||
'__wakeup', | ||
]; | ||
|
||
public function run() | ||
{ | ||
foreach ($this->magicMethods as $magicMethod) { | ||
echo $magicMethod; | ||
} | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture; | ||
|
||
class DoNotRemoveComment | ||
{ | ||
// some comment | ||
private const MAGIC_METHODS = [ | ||
'__toString', | ||
'__wakeup', | ||
]; | ||
|
||
public function run() | ||
{ | ||
foreach (self::MAGIC_METHODS as $magicMethod) { | ||
echo $magicMethod; | ||
} | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters