Skip to content

Commit d0b99e9

Browse files
committed
test remembers define() from __construct()
1 parent 287626f commit d0b99e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/PHPStan/Rules/Constants/data/remembered-constructor-scope.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,13 @@ public function myFoo(): void
6767
echo ANOTHER_REMEMBERED_FOO;
6868
}
6969
}
70+
71+
class MyClassWithDefine {
72+
public function __construct() {
73+
define('XYZ', '123');
74+
}
75+
76+
public function doFoo(): void {
77+
echo XYZ;
78+
}
79+
}

0 commit comments

Comments
 (0)