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):
161161 private function getClassNames (\PhpParser \Node $ node , \PHPStan \Analyser \Scope $ scope ): array
162162 {
163163 if ($ node ->class instanceof \PhpParser \Node \Name) {
164- return [[( string ) $ node ->class , \true]];
164+ return [[$ scope -> resolveName ( $ node ->class ) , \true]];
165165 }
166166 if ($ node ->class instanceof \PhpParser \Node \Stmt \Class_) {
167167 $ classNames = $ scope ->getType ($ node )->getObjectClassNames ();
Original file line number Diff line number Diff line change 66
77use Test \Ebln \PHPStan \EnforceFactory \dataAttrib \code \EmptyProduct ;
88
9- class EmptyFactory
9+ final class EmptyFactory
1010{
1111 public function class (): EmptyProduct
1212 {
1313 return new EmptyProduct ();
1414 }
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+ }
1525}
Original file line number Diff line number Diff line change 66
77class FreeProduct
88{
9-
109}
You can’t perform that action at this time.
0 commit comments