You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message:"#^Call to an undefined method ReflectionClass\\:\\:getAttributes\\(\\)\\.$#"
4
+
message:'#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#'
5
+
identifier:foreach.nonIterable
6
+
count:1
5
7
path:src/ForceFactoryRule.php
6
8
7
9
-
8
-
message:"#^Method Ebln\\\\PHPStan\\\\EnforceFactory\\\\ForceFactoryRule\\:\\:getFactoriesFromAttributeByClass\\(\\) has parameter \\$reflection with generic class ReflectionClass but does not specify its types\\: T$#"
10
+
message:'#^Call to an undefined method ReflectionClass\:\:getAttributes\(\)\.$#'
11
+
identifier:method.notFound
12
+
count:1
9
13
path:src/ForceFactoryRule.php
10
14
11
15
-
12
-
message:"#^PHPDoc tag @param for parameter \\$reflection with type PHPStan\\\\BetterReflection\\\\Reflection\\\\Adapter\\\\ReflectionClass\\|PHPStan\\\\BetterReflection\\\\Reflection\\\\Adapter\\\\ReflectionEnum is not subtype of native type ReflectionClass\\.$#"
16
+
message:'#^Cannot call method getName\(\) on mixed\.$#'
17
+
identifier:method.nonObject
18
+
count:1
19
+
path:src/ForceFactoryRule.php
20
+
21
+
-
22
+
message:'#^Cannot call method newInstance\(\) on mixed\.$#'
23
+
identifier:method.nonObject
24
+
count:1
25
+
path:src/ForceFactoryRule.php
26
+
27
+
-
28
+
message:'#^Method Ebln\\PHPStan\\EnforceFactory\\ForceFactoryRule\:\:getFactoriesFromAttributeByClass\(\) has parameter \$reflection with generic class ReflectionClass but does not specify its types\: T$#'
29
+
identifier:missingType.generics
30
+
count:1
31
+
path:src/ForceFactoryRule.php
32
+
33
+
-
34
+
message:'#^PHPDoc tag @param for parameter \$reflection with type PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionClass\|PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnum is not subtype of native type ReflectionClass\.$#'
Copy file name to clipboardExpand all lines: tests/AttribForceFactoryRuleTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
*/
15
15
class AttribForceFactoryRuleTest extends RuleTestCase
16
16
{
17
-
privateconstERROR_MESSAGE = 'Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory!';
17
+
privateconstERROR_MESSAGE = 'Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ForcedFactoryProduct!";
18
18
19
19
// Sadly this remains a vector, as phpstan fails to infer the created class name
20
20
publicfunctiontestLoopholeFactory(): void
@@ -49,9 +49,9 @@ public function testRogueFactory(): void
49
49
[self::ERROR_MESSAGE, 40 + $offset],
50
50
[self::ERROR_MESSAGE, 51 + $offset],
51
51
[self::ERROR_MESSAGE, 56 + $offset],
52
-
['Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ExtendedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory!', 69 + $offset],
52
+
['Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ExtendedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\dataAttrib\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\dataAttrib\TraitFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\ExtendedProduct!", 69 + $offset],
53
53
[self::ERROR_MESSAGE, 95 + $offset],
54
-
['Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\IndependentForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\IndependentFactory!', 100 + $offset],
54
+
['Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\IndependentForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataAttrib\IndependentFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\dataAttrib\IndependentFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\dataAttrib\code\IndependentForcedFactoryProduct!", 100 + $offset],
Copy file name to clipboardExpand all lines: tests/ForceFactoryRuleTest.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@
13
13
*/
14
14
class ForceFactoryRuleTest extends RuleTestCase
15
15
{
16
-
privateconstERROR_MESSAGE = 'Test\Ebln\PHPStan\EnforceFactory\data\code\ForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory!';
16
+
privateconstERROR_MESSAGE = 'Test\Ebln\PHPStan\EnforceFactory\data\code\ForcedFactoryProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory!'
17
+
. "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\data\code\ForcedFactoryProduct!";
17
18
18
19
// Sadly this remains a vector, as phpstan fails to infer the created class name
19
20
publicfunctiontestLoopholeFactory(): void
@@ -41,7 +42,7 @@ public function testRogueFactory(): void
41
42
[self::ERROR_MESSAGE, 40],
42
43
[self::ERROR_MESSAGE, 51],
43
44
[self::ERROR_MESSAGE, 56],
44
-
['Test\Ebln\PHPStan\EnforceFactory\data\code\ExtendedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory!', 69],
45
+
['Test\Ebln\PHPStan\EnforceFactory\data\code\ExtendedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\data\ForcedFactory or Test\Ebln\PHPStan\EnforceFactory\data\TraitFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\data\code\ExtendedProduct!", 69],
['Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\AttributeProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory!', 14],
32
-
['Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\MixedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory or Test\Ebln\PHPStan\EnforceFactory\dataMixed\ForcedFactory!', 19],
31
+
['Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\AttributeProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\AttributeProduct!", 14],
32
+
['Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\MixedProduct must be instantiated by Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory or Test\Ebln\PHPStan\EnforceFactory\dataMixed\ForcedFactory!' . "\n 💡 Only use Test\Ebln\PHPStan\EnforceFactory\dataMixed\AttributeFactory or Test\Ebln\PHPStan\EnforceFactory\dataMixed\ForcedFactory to create an instance of Test\Ebln\PHPStan\EnforceFactory\dataMixed\code\MixedProduct!", 19],
0 commit comments