-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support more assign cases in PropertyFetchAssignManipulator (#6192)
- Loading branch information
1 parent
56f4768
commit 0c06da9
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
rules-tests/Php81/Rector/Property/ReadOnlyPropertyRector/Fixture/skip_assign_op.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,23 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\Property\ReadOnlyPropertyRector\Fixture; | ||
|
||
final class SkipAssignOp | ||
{ | ||
private string $name; | ||
private int $count; | ||
|
||
public function __construct(string $name, bool $flag = false) | ||
{ | ||
$this->name = $name; | ||
|
||
if ($flag) { | ||
$this->name .= 'changed'; | ||
} | ||
|
||
$this->count = 0; | ||
if ($flag) { | ||
++$this->count; | ||
} | ||
} | ||
} |
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