Skip to content

Commit bd39e48

Browse files
authored
Add fixture for implicit readonly property promotion on DowngradeReadonlyPropertyRector (#315)
1 parent ef64849 commit bd39e48

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
namespace Rector\Tests\DowngradePhp81\Rector\Property\DowngradeReadonlyPropertyRector\Fixture;
4+
5+
class ReadonlyImplicitPropertyPromotion
6+
{
7+
public function __construct(
8+
readonly string $foo = 'foo'
9+
)
10+
{
11+
}
12+
}
13+
14+
?>
15+
-----
16+
<?php
17+
18+
namespace Rector\Tests\DowngradePhp81\Rector\Property\DowngradeReadonlyPropertyRector\Fixture;
19+
20+
class ReadonlyImplicitPropertyPromotion
21+
{
22+
public function __construct(
23+
public string $foo = 'foo'
24+
)
25+
{
26+
}
27+
}
28+
29+
?>

0 commit comments

Comments
 (0)