Skip to content

Commit d4a8286

Browse files
committed
Add readonly properties
1 parent 168e2c2 commit d4a8286

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/VariableAnalysisSniff/fixtures/AnonymousClassWithPropertiesFixture.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public function methodWithStaticVar() {
4444

4545
class ClassWithAnonymousClassAndTypeHints
4646
{
47-
int $main_id = 1;
47+
readonly int $main_id;
4848
public int $id = 1;
4949
public \My\Data|bool $data;
5050

5151
public function test_1(): object
5252
{
5353
return new class
5454
{
55-
int $main_id = 1;
55+
readonly int $main_id;
5656
public int $id = 123456;
5757
public \My\Data|bool $data;
5858
};

0 commit comments

Comments
 (0)