/
dimamir
/
Wsdl_PackageGenerator
Обзор
Документация
Войти
/
dimamir
/
Wsdl_PackageGenerator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
rector.php
35 строк
1 KB
Mikaël DELSOL
Add Rector PHP to ease code improvement (#281)
01 апр 2023, 23:07
Не верифицирован
01 апр 2023, 23:07
801ec3f
Код
Авторство
О чём код?
<?php declare(strict_types=1); use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\CodeQuality\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector; use Rector\Config\RectorConfig; use Rector\Set\ValueObject\LevelSetList; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector; return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ __DIR__.'/src', __DIR__.'/tests', ]); $rectorConfig->skip([ __DIR__.'/tests/resources', ]); // define sets of rules $rectorConfig->sets([ LevelSetList::UP_TO_PHP_74, ]); // replace fully qualified class name by use statements $rectorConfig->importShortClasses(false); // keep native PHP class short name import $rectorConfig->importNames(); // register a single rule $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); $rectorConfig->rule(ReturnTypeFromStrictNativeCallRector::class); $rectorConfig->rule(ReturnTypeFromStrictScalarReturnExprRector::class); $rectorConfig->rule(ReturnTypeFromStrictTypedPropertyRector::class); };