-
-
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.
[CodingStyle] Skip readonly type property on AddArrayDefaultToArrayPr…
…opertyRector (#2196) * Add failing test fixture for AddArrayDefaultToArrayPropertyRector # Failing Test for AddArrayDefaultToArrayPropertyRector Based on https://getrector.org/demo/0cb77e6c-9502-44fa-9ecd-e4d46838e7a2 * Closes #2195 * clean up Co-authored-by: Martin Kluska <martin@kluska.cz>
- Loading branch information
1 parent
b33f8a5
commit 3e685a6
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...Rector/Class_/AddArrayDefaultToArrayPropertyRector/Fixture/skip_readonly_property.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,19 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector\Fixture; | ||
|
||
abstract class SkipReadonlyProperty | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
public readonly array $changes; | ||
|
||
public function __construct(Model $model) | ||
{ | ||
$this->changes = $model->getChanges(); | ||
} | ||
} | ||
|
||
?> | ||
|
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