Skip to content

Commit 31b9247

Browse files
committed
Improve test with iface children
1 parent e56291f commit 31b9247

File tree

1 file changed

+7
-0
lines changed
  • tests/Rule/data/EnforceReadonlyPublicPropertyRule

1 file changed

+7
-0
lines changed

tests/Rule/data/EnforceReadonlyPublicPropertyRule/code-84.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,10 @@ interface MyInterface {
5050
public string $key { get; }
5151
}
5252

53+
class ImplementingClass implements MyInterface {
54+
public string $key; // error: Public property `key` not marked as readonly.
55+
}
56+
57+
class ImplementingClass2 implements MyInterface {
58+
public readonly string $key;
59+
}

0 commit comments

Comments
 (0)