mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 14:28:42 +02:00
Updated rector config
This commit is contained in:
parent
ce86863095
commit
6665203f2a
1 changed files with 43 additions and 0 deletions
43
rector.php
43
rector.php
|
@ -16,6 +16,48 @@ use Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstan
|
|||
use Rector\Symfony\Set\SymfonySetList;
|
||||
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
|
||||
|
||||
return RectorConfig::configure()
|
||||
->withComposerBased(phpunit: true)
|
||||
|
||||
->withSymfonyContainerPhp(__DIR__ . '/tests/symfony-container.php')
|
||||
->withSymfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml')
|
||||
|
||||
->withImportNames(importShortClasses: false)
|
||||
->withPaths([
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/public',
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/tests',
|
||||
])
|
||||
|
||||
->withRules([
|
||||
DeclareStrictTypesRector::class
|
||||
])
|
||||
|
||||
->withSkip([
|
||||
CountArrayToEmptyArrayComparisonRector::class,
|
||||
//Leave our !== null checks alone
|
||||
FlipTypeControlToUseExclusiveTypeRector::class,
|
||||
//Leave our PartList TableAction alone
|
||||
ActionSuffixRemoverRector::class,
|
||||
//We declare event listeners via attributes, therefore no need to migrate them to subscribers
|
||||
EventListenerToEventSubscriberRector::class,
|
||||
PreferPHPUnitThisCallRector::class,
|
||||
//Do not replace 'GET' with class constant,
|
||||
LiteralGetToRequestClassConstantRector::class,
|
||||
])
|
||||
|
||||
//Do not apply rules to Symfony own files
|
||||
->withSkip([
|
||||
__DIR__ . '/public/index.php',
|
||||
__DIR__ . '/src/Kernel.php',
|
||||
__DIR__ . '/config/preload.php',
|
||||
__DIR__ . '/config/bundles.php',
|
||||
])
|
||||
|
||||
;
|
||||
|
||||
/*
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml');
|
||||
$rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php');
|
||||
|
@ -79,3 +121,4 @@ return static function (RectorConfig $rectorConfig): void {
|
|||
__DIR__ . '/config/bundles.php',
|
||||
]);
|
||||
};
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue