File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 99 - PHPStan\Rules\PHPUnit\NoMissingSpaceInMethodAnnotationRule
1010 - PHPStan\Rules\PHPUnit\ShouldCallParentMethodsRule
1111
12+ conditionalTags :
13+ PHPStan\Rules\PHPUnit\AssertEqualsIsDiscouragedRule :
14+ phpstan.rules.rule : [%strictRulesInstalled% , %featureToggles.bleedingEdge% ]
15+
1216services :
1317 -
1418 class : PHPStan\Rules\PHPUnit\DataProviderDeclarationRule
@@ -20,7 +24,3 @@ services:
2024
2125 -
2226 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 1818class AssertEqualsIsDiscouragedRule implements Rule
1919{
2020
21- private bool $ strictRulesInstalled ;
22-
23- public function __construct (
24- bool $ strictRulesInstalled
25- )
26- {
27- $ this ->strictRulesInstalled = $ strictRulesInstalled ;
28- }
29-
3021 public function getNodeType (): string
3122 {
3223 return NodeAbstract::class;
3324 }
3425
3526 public function processNode (Node $ node , Scope $ scope ): array
3627 {
37- if (!$ this ->strictRulesInstalled ) {
38- return [];
39- }
40-
4128 if (!AssertRuleHelper::isMethodOrStaticCallOnAssert ($ node , $ scope )) {
4229 return [];
4330 }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testRule(): void
3232
3333 protected function getRule (): Rule
3434 {
35- return new AssertEqualsIsDiscouragedRule (true );
35+ return new AssertEqualsIsDiscouragedRule ();
3636 }
3737
3838}
You can’t perform that action at this time.
0 commit comments