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
10561056 $ this ->analyse ([__DIR__ . '/data/trait-mixin.php ' ], []);
10571057 }
10581058
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+
10591067 #[RequiresPhp('>= 8.4 ' )]
10601068 public function testAsymmetricVisibility (): void
10611069 {
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