diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 72c250562..1afe2e232 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -56,6 +56,8 @@ ]], 'php_unit_strict' => true, 'php_unit_test_case_static_method_calls' => true, + 'php_unit_data_provider_name' => true, + 'php_unit_data_provider_return_type' => true, 'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']], 'single_line_throw' => false, 'static_lambda' => true, diff --git a/rector.php b/rector.php index 6454e91a6..dd4380e38 100644 --- a/rector.php +++ b/rector.php @@ -20,6 +20,10 @@ use Rector\Config\RectorConfig; use Rector\Php70\Rector\FunctionLike\ExceptionHandlerTypehintRector; use Rector\Php71\Rector\FuncCall\CountOnNullRector; +use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector; +use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; +use Rector\PHPUnit\Set\PHPUnitLevelSetList; +use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { @@ -30,6 +34,8 @@ $rectorConfig->sets([ LevelSetList::UP_TO_PHP_80, + PHPUnitLevelSetList::UP_TO_PHPUNIT_90, + PHPUnitSetList::PHPUNIT_CODE_QUALITY, ]); $rectorConfig->importNames(); @@ -37,5 +43,7 @@ $rectorConfig->skip([ CountOnNullRector::class, ExceptionHandlerTypehintRector::class, + AddSeeTestAnnotationRector::class, + PreferPHPUnitThisCallRector::class, ]); };