mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Added declare strict types to all files
This commit is contained in:
parent
bea90a7d94
commit
6a2ff9d153
196 changed files with 685 additions and 360 deletions
13
rector.php
13
rector.php
|
@ -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,
|
||||
]);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue