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 @@ -1068,6 +1068,14 @@ public function testTraitMixin(): void
1068
1068
$ this ->analyse ([__DIR__ . '/data/trait-mixin.php ' ], []);
1069
1069
}
1070
1070
1071
+ public function testBug9706 (): void
1072
+ {
1073
+ $ this ->checkThisOnly = false ;
1074
+ $ this ->checkUnionTypes = true ;
1075
+ $ this ->checkDynamicProperties = true ;
1076
+ $ this ->analyse ([__DIR__ . '/data/bug-9706.php ' ], []);
1077
+ }
1078
+
1071
1079
#[RequiresPhp('>= 8.4 ' )]
1072
1080
public function testAsymmetricVisibility (): void
1073
1081
{
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