mirror of
https://github.com/phpmon/website
synced 2025-08-07 06:40:08 +02:00
Add Rector & various upgrades
This commit is contained in:
26
rector.php
Normal file
26
rector.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
|
||||
use RectorLaravel\Set\LaravelSetList;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->paths([
|
||||
__DIR__.'/app',
|
||||
__DIR__.'/tests',
|
||||
]);
|
||||
|
||||
$rectorConfig->rules([
|
||||
ReturnTypeFromStrictNativeCallRector::class,
|
||||
]);
|
||||
|
||||
$rectorConfig->sets([
|
||||
SetList::CODE_QUALITY,
|
||||
LevelSetList::UP_TO_PHP_83,
|
||||
LaravelSetList::LARAVEL_100,
|
||||
]);
|
||||
};
|
Reference in New Issue
Block a user