-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Privatization] Skip Property unsetted on ChangeReadOnlyPropertyWithD…
…efaultValueToConstantRector (#2981)
- Loading branch information
1 parent
8392cf7
commit 68a3490
Showing
4 changed files
with
28 additions
and
2 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
11 changes: 11 additions & 0 deletions
11
...ertyWithDefaultValueToConstantRector/Fixture/skip_unsetted_parent_array_dim_fetch.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,11 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture; | ||
|
||
final class SkipUnsettedParentArrayDimFetch { | ||
private static $array = ['foo' => 'bar']; | ||
|
||
public function run() { | ||
unset(self::$array['foo']); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...OnlyPropertyWithDefaultValueToConstantRector/Fixture/skip_unsetted_property_fetch.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,11 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector\Fixture; | ||
|
||
final class SkipUnsettedPropertyFetch { | ||
private $array = ['foo' => 'bar']; | ||
|
||
public function run() { | ||
unset($this->array); | ||
} | ||
} |
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