mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
33 lines
992 B
PHP
33 lines
992 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
/**
|
||
|
* This file is part of Hyperf.
|
||
|
*
|
||
|
* @link https://www.hyperf.io
|
||
|
* @document https://hyperf.wiki
|
||
|
* @contact group@hyperf.io
|
||
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||
|
*/
|
||
|
use Rector\Core\Configuration\Option;
|
||
|
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
||
|
use Rector\Set\ValueObject\LevelSetList;
|
||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||
|
|
||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||
|
// get parameters
|
||
|
$parameters = $containerConfigurator->parameters();
|
||
|
$parameters->set(Option::PATHS, [
|
||
|
__DIR__ . '/src',
|
||
|
]);
|
||
|
|
||
|
// Define what rule sets will be applied
|
||
|
$containerConfigurator->import(LevelSetList::UP_TO_PHP_80);
|
||
|
|
||
|
// get services (needed for register a single rule)
|
||
|
// $services = $containerConfigurator->services();
|
||
|
|
||
|
// register a single rule
|
||
|
// $services->set(TypedPropertyRector::class);
|
||
|
};
|