Skip to content

Commit

Permalink
Update Rector configuration and add type coverage level
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei committed Apr 26, 2024
1 parent 86bff5c commit f805a3c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use RectorLaravel\Set\LaravelSetList;

return RectorConfig::configure()
Expand All @@ -25,20 +24,26 @@
->withPreparedSets(
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
)
->withDeadCodeLevel(42)
->withTypeCoverageLevel(37)
// ->withImportNames()
->withSkip([
StringClassNameToClassConstantRector::class,
DisallowedEmptyRuleFixerRector::class,
StaticArrowFunctionRector::class,
StaticClosureRector::class,
])
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
//
])
->withSets([
LaravelSetList::LARAVEL_110,
LaravelSetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
LaravelSetList::LARAVEL_CODE_QUALITY,
LaravelSetList::LARAVEL_ARRAY_STR_FUNCTION_TO_STATIC_CALL,
LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES,
LaravelSetList::LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER,
]);

0 comments on commit f805a3c

Please sign in to comment.