File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
tests/PHPStan/Rules/Properties Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,16 @@ public function testAccessPropertiesOnThisOnly(): void
344344 );
345345 }
346346
347+ public function testBug12692 (): void
348+ {
349+ $ this ->checkThisOnly = false ;
350+ $ this ->checkUnionTypes = false ;
351+ $ this ->checkDynamicProperties = false ;
352+ $ this ->analyse ([__DIR__ . '/data/bug-12692.php ' ], [
353+ // This should not be empty!
354+ ]);
355+ }
356+
347357 public function testAccessPropertiesAfterIsNullInBooleanOr (): void
348358 {
349359 $ this ->checkThisOnly = false ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Bug12692 ;
6+
7+ class Foo
8+ {
9+
10+ public static $ static ;
11+
12+ public function foo ()
13+ {
14+ $ this ->static ;
15+ }
16+
17+ }
You can’t perform that action at this time.
0 commit comments