mirror of
https://github.com/chevereto/chevereto.git
synced 2026-05-07 05:15:27 +02:00
Automatic push 4.0.5
This commit is contained in:
35
app/rector.php
Normal file
35
app/rector.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Chevereto.
|
||||
*
|
||||
* (c) Rodolfo Berrios <rodolfo@chevereto.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
// get parameters
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(Option::PATHS, [
|
||||
__DIR__ . '/app'
|
||||
]);
|
||||
|
||||
// Define what rule sets will be applied
|
||||
$containerConfigurator->import(SetList::DEAD_CODE);
|
||||
$containerConfigurator->import(SetList::PHP_80);
|
||||
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81);
|
||||
// get services (needed for register a single rule)
|
||||
// $services = $containerConfigurator->services();
|
||||
|
||||
// register a single rule
|
||||
// $services->set(TypedPropertyRector::class);
|
||||
};
|
||||
Reference in New Issue
Block a user