Repository navigation
Expand file tree
/
Copy pathrector.php
More file actions
42 lines (38 loc) · 1.71 KB
/
Copy pathrector.php
File metadata and controls
42 lines (38 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
/*
* This file is part of the Picasso Bundle package.
*
* (c) SILARHI <dev@silarhi.fr>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use Rector\CodeQuality\Rector\Concat\DirnameDirConcatStringToDirectStringPathRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveReturnTagIncompatibleWithNativeTypeRector;
return RectorConfig::configure()
->withPaths([
'src',
'tests',
])
->withPhpSets(php82: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
)
->withSkip([
// Would name the vich mapping class installed locally: PropertyMapping (vich 2) or PropertyMappingInterface
// (vich 3), and naming either breaks the other major. VichMappingHelper keeps mappings in local variables on purpose.
FlipTypeControlToUseExclusiveTypeRector::class => [__DIR__ . '/src/Loader/VichMappingHelper.php'],
// Would turn the Twig path into "src/../templates", which then shows in Twig cache keys, debug:twig and errors
DirnameDirConcatStringToDirectStringPathRector::class => [__DIR__ . '/src/PicassoBundle.php'],
// Would drop @return TransformerParams / CacheControlConfig: Rector does not resolve PHPStan type aliases
RemoveReturnTagIncompatibleWithNativeTypeRector::class => [
__DIR__ . '/src/Transformer/GlideTransformer.php',
__DIR__ . '/src/Transformer/ImgixTransformer.php',
__DIR__ . '/tests/Controller/ImageControllerTest.php',
],
]);