File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
tests/PHPStan/Rules/Properties Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1056,6 +1056,14 @@ public function testTraitMixin(): void
1056
1056
$ this ->analyse ([__DIR__ . '/data/trait-mixin.php ' ], []);
1057
1057
}
1058
1058
1059
+ public function testBug9706 (): void
1060
+ {
1061
+ $ this ->checkThisOnly = false ;
1062
+ $ this ->checkUnionTypes = true ;
1063
+ $ this ->checkDynamicProperties = true ;
1064
+ $ this ->analyse ([__DIR__ . '/data/bug-9706.php ' ], []);
1065
+ }
1066
+
1059
1067
#[RequiresPhp('>= 8.4 ' )]
1060
1068
public function testAsymmetricVisibility (): void
1061
1069
{
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types = 1 );
2
+
3
+ namespace BUg9706 ;
4
+
5
+ class MissingDOMNamedNodeMapProperty
6
+ {
7
+ public function test (): void
8
+ {
9
+ $ node = new \DOMElement ('div ' );
10
+ $ attributes = $ node ->attributes ;
11
+ // According to the php.net docs, $length should be a public read-only property.
12
+ // See https://www.php.net/manual/en/class.domnamednodemap.php
13
+ $ length = $ attributes ->length ;
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments