File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
tests/PHPStan/Rules/Properties Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,12 @@ public function testBug12586(): void
260
260
}
261
261
262
262
$ this ->reportMaybes = true ;
263
- $ this ->analyse ([__DIR__ . '/data/bug-12586.php ' ], []);
263
+ $ this ->analyse ([__DIR__ . '/data/bug-12586.php ' ], [
264
+ [
265
+ 'Readonly property Bug12586\FooImpl::$baz overrides readwrite property Bug12586\Foo::$baz. ' ,
266
+ 23 ,
267
+ ],
268
+ ]);
264
269
}
265
270
266
271
}
Original file line number Diff line number Diff line change @@ -9,12 +9,18 @@ interface Foo
9
9
public string $ bar {
10
10
get;
11
11
}
12
+
13
+ public string $ baz {
14
+ get;
15
+ set;
16
+ }
12
17
}
13
18
14
19
readonly class FooImpl implements Foo
15
20
{
16
21
public function __construct (
17
22
public string $ bar ,
23
+ public string $ baz ,
18
24
)
19
25
{
20
26
}
You can’t perform that action at this time.
0 commit comments