File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ private function getFactoriesFromAttributeByClass(\ReflectionClass $reflection):
161
161
private function getClassNames (\PhpParser \Node $ node , \PHPStan \Analyser \Scope $ scope ): array
162
162
{
163
163
if ($ node ->class instanceof \PhpParser \Node \Name) {
164
- return [[( string ) $ node ->class , \true]];
164
+ return [[$ scope -> resolveName ( $ node ->class ) , \true]];
165
165
}
166
166
if ($ node ->class instanceof \PhpParser \Node \Stmt \Class_) {
167
167
$ classNames = $ scope ->getType ($ node )->getObjectClassNames ();
Original file line number Diff line number Diff line change 6
6
7
7
use Test \Ebln \PHPStan \EnforceFactory \dataAttrib \code \EmptyProduct ;
8
8
9
- class EmptyFactory
9
+ final class EmptyFactory
10
10
{
11
11
public function class (): EmptyProduct
12
12
{
13
13
return new EmptyProduct ();
14
14
}
15
+
16
+ public static function createSelf (): self
17
+ {
18
+ return new self ();
19
+ }
20
+
21
+ public static function createStatic (): static
22
+ {
23
+ return new static ();
24
+ }
15
25
}
Original file line number Diff line number Diff line change 6
6
7
7
class FreeProduct
8
8
{
9
-
10
9
}
You can’t perform that action at this time.
0 commit comments