Skip to content

Commit

Permalink
Rewrite in backward compatibility compliant way
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 9, 2021
1 parent d6df6a0 commit eb0dc44
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@ class ImpossibleCheckTypeMethodCallRuleTest extends \PHPStan\Testing\RuleTestCas

protected function getRule(): Rule
{
return new ImpossibleCheckTypeStaticMethodCallRule(new ImpossibleCheckTypeHelper($this->createBroker(), $this->getTypeSpecifier(), [], true), true, true);
}

/**
* @return \PHPStan\Type\StaticMethodTypeSpecifyingExtension[]
*/
protected function getStaticMethodTypeSpecifyingExtensions(): array
{
return [
new AssertTypeSpecifyingExtension(),
];
return new ImpossibleCheckTypeStaticMethodCallRule(self::getContainer()->getByType(ImpossibleCheckTypeHelper::class), true, true);
}

public function testExtension(): void
Expand All @@ -37,4 +27,11 @@ public function testExtension(): void
]);
}

public static function getAdditionalConfigFiles(): array
{
return [
__DIR__ . '/../../../extension.neon',
];
}

}

0 comments on commit eb0dc44

Please sign in to comment.