Added declare strict types to all files

This commit is contained in:
Jan Böhmer 2023-06-11 18:59:07 +02:00
parent bea90a7d94
commit 6a2ff9d153
196 changed files with 685 additions and 360 deletions

View file

@ -2,15 +2,17 @@
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Rector\ClassMethod\AddDoesNotPerformAssertionToNonAssertingTestRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonyLevelSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml');
@ -31,6 +33,10 @@ return static function (RectorConfig $rectorConfig): void {
// register a single rule
//$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
$rectorConfig->rules([
DeclareStrictTypesRector::class,
]);
// define sets of rules
$rectorConfig->sets([
//PHP rules
@ -49,4 +55,9 @@ return static function (RectorConfig $rectorConfig): void {
PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
]);
$rectorConfig->skip([
AddDoesNotPerformAssertionToNonAssertingTestRector::class,
CountArrayToEmptyArrayComparisonRector::class,
]);
};