File tree Expand file tree Collapse file tree 4 files changed +4
-14
lines changed
Expand file tree Collapse file tree 4 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,3 @@ parameters:
66 paths :
77 - src
88 - tests
9-
10- excludePaths :
11- analyseAndScan :
12- - tests/data/*
13- - tests/dataAttrib/*
14- - tests/dataMixed/*
15-
16- rules :
17- - \Ebln\PHPStan\EnforceFactory\ForceFactoryRule
Original file line number Diff line number Diff line change 66
77class LoopholeFactory
88{
9- public function variableUninferable (bool $ toggle ): void
9+ public function variableUninferable (bool $ toggle ): object
1010 {
1111 if ($ toggle ) {
1212 $ class = '\Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\LoopholeProduct ' ;
1313 } else {
1414 $ class = 'Hello world- ' . random_int (10 , 99 );
1515 }
1616
17- $ new = new $ class ();
17+ return new $ class ();
1818 }
1919}
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public function expectedFailingLoophole(): object
2020 return $ loophole ;
2121 }
2222
23- public function expectedMissingClass ()
23+ public function expectedMissingClass (): void
2424 {
25- return $ this ->loopholeFactory ->variableUninferable (false );
25+ $ this ->loopholeFactory ->variableUninferable (false );
2626 }
2727}
Original file line number Diff line number Diff line change 77use Test \Ebln \PHPStan \EnforceFactory \dataAttrib \IndependentFactory ;
88
99#[\Ebln \Attrib \ForceFactory(IndependentFactory::class)]
10- #[\INVALID \NOT \FOUND \ATTRIBUTE (IndependentFactory::class)]
1110class IndependentForcedFactoryProduct
1211{
1312}
You can’t perform that action at this time.
0 commit comments