2021-12-29 11:21:02 +08:00
|
|
|
<?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
|
|
|
|
*/
|
2023-06-07 10:16:25 +08:00
|
|
|
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
|
|
use Rector\PHPUnit\Set\PHPUnitSetList;
|
2021-12-29 11:21:02 +08:00
|
|
|
|
2023-06-07 10:16:25 +08:00
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
|
|
$rectorConfig->paths([
|
|
|
|
__DIR__ . '/src/*/tests',
|
2021-12-29 11:21:02 +08:00
|
|
|
]);
|
|
|
|
|
|
|
|
// register a single rule
|
2023-06-07 10:16:25 +08:00
|
|
|
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
|
|
|
|
|
|
|
// define sets of rules
|
|
|
|
$rectorConfig->sets([
|
|
|
|
PHPUnitSetList::PHPUNIT_100,
|
|
|
|
]);
|
2021-12-29 11:21:02 +08:00
|
|
|
};
|