File tree 3 files changed +5
-18
lines changed
3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 9
9
- PHPStan\Rules\PHPUnit\NoMissingSpaceInMethodAnnotationRule
10
10
- PHPStan\Rules\PHPUnit\ShouldCallParentMethodsRule
11
11
12
+ conditionalTags :
13
+ PHPStan\Rules\PHPUnit\AssertEqualsIsDiscouragedRule :
14
+ phpstan.rules.rule : [%strictRulesInstalled% , %featureToggles.bleedingEdge% ]
15
+
12
16
services :
13
17
-
14
18
class : PHPStan\Rules\PHPUnit\DataProviderDeclarationRule
@@ -20,7 +24,3 @@ services:
20
24
21
25
-
22
26
class : PHPStan\Rules\PHPUnit\AssertEqualsIsDiscouragedRule
23
- arguments :
24
- strictRulesInstalled : %strictRulesInstalled%
25
- tags :
26
- - phpstan.rules.rule
Original file line number Diff line number Diff line change 18
18
class AssertEqualsIsDiscouragedRule implements Rule
19
19
{
20
20
21
- private bool $ strictRulesInstalled ;
22
-
23
- public function __construct (
24
- bool $ strictRulesInstalled
25
- )
26
- {
27
- $ this ->strictRulesInstalled = $ strictRulesInstalled ;
28
- }
29
-
30
21
public function getNodeType (): string
31
22
{
32
23
return NodeAbstract::class;
33
24
}
34
25
35
26
public function processNode (Node $ node , Scope $ scope ): array
36
27
{
37
- if (!$ this ->strictRulesInstalled ) {
38
- return [];
39
- }
40
-
41
28
if (!AssertRuleHelper::isMethodOrStaticCallOnAssert ($ node , $ scope )) {
42
29
return [];
43
30
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testRule(): void
32
32
33
33
protected function getRule (): Rule
34
34
{
35
- return new AssertEqualsIsDiscouragedRule (true );
35
+ return new AssertEqualsIsDiscouragedRule ();
36
36
}
37
37
38
38
}
You can’t perform that action at this time.
0 commit comments