diff --git a/test/Unit/FactoryTest.php b/test/Unit/FactoryTest.php index df66428d..41cb9130 100644 --- a/test/Unit/FactoryTest.php +++ b/test/Unit/FactoryTest.php @@ -14,7 +14,6 @@ namespace Ergebnis\PhpCsFixer\Config\Test\Unit; use Ergebnis\PhpCsFixer\Config; -use PhpCsFixer\ConfigInterface; use PHPUnit\Framework; /** @@ -95,7 +94,6 @@ public function testFromRuleSetCreatesConfig(int $targetPhpVersion): void $config = Config\Factory::fromRuleSet($ruleSet->reveal()); - self::assertInstanceOf(ConfigInterface::class, $config); self::assertTrue($config->getUsingCache()); self::assertTrue($config->getRiskyAllowed()); self::assertSame($rules, $config->getRules()); @@ -155,7 +153,6 @@ public function testFromRuleSetCreatesConfigWithOverrideRules(): void $overrideRules ); - self::assertInstanceOf(ConfigInterface::class, $config); self::assertTrue($config->getUsingCache()); self::assertTrue($config->getRiskyAllowed()); self::assertSame(\array_merge($rules, $overrideRules), $config->getRules()); diff --git a/test/Unit/RuleSet/AbstractRuleSetTestCase.php b/test/Unit/RuleSet/AbstractRuleSetTestCase.php index 62530e06..3ee636c5 100644 --- a/test/Unit/RuleSet/AbstractRuleSetTestCase.php +++ b/test/Unit/RuleSet/AbstractRuleSetTestCase.php @@ -227,7 +227,7 @@ private function builtInFixers(): array $fixerFactory = FixerFactory::create(); $fixerFactory->registerBuiltInFixers(); - $builtInFixers = \array_map(static function (Fixer\FixerInterface $fixer) { + $builtInFixers = \array_map(static function (Fixer\FixerInterface $fixer): string { return $fixer->getName(); }, $fixerFactory->getFixers()); } @@ -242,7 +242,7 @@ private function configuredFixers(): array * * @see https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2361 */ - $rules = \array_map(static function () { + $rules = \array_map(static function (): bool { return true; }, self::createRuleSet()->rules());