Updated Rector to commit e368dabaed

e368dabaed [Downgrade] Add class method param to DowngradeEnumToConstantListClassRector (#2417)
This commit is contained in:
Tomas Votruba 2022-06-02 13:14:04 +00:00
parent e58cb04bad
commit dae285bc0d
12 changed files with 254 additions and 35 deletions

View File

@ -1,4 +1,4 @@
# 513 Rules Overview
# 516 Rules Overview
<br>
@ -38,10 +38,12 @@
- [DowngradePhp74](#downgradephp74) (12)
- [DowngradePhp80](#downgradephp80) (28)
- [DowngradePhp80](#downgradephp80) (29)
- [DowngradePhp81](#downgradephp81) (9)
- [DowngradePhp82](#downgradephp82) (1)
- [EarlyReturn](#earlyreturn) (11)
- [MysqlToMysqli](#mysqltomysqli) (4)
@ -70,7 +72,7 @@
- [Php74](#php74) (14)
- [Php80](#php80) (17)
- [Php80](#php80) (18)
- [Php81](#php81) (9)
@ -2192,13 +2194,12 @@ Changes `$this->...` and static:: to self:: or vise versa for given types
```php
use PHPUnit\Framework\TestCase;
use Rector\CodingStyle\Enum\PreferenceSelfThis;
use Rector\CodingStyle\Rector\MethodCall\PreferThisOrSelfMethodCallRector;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(PreferThisOrSelfMethodCallRector::class, [
TestCase::class => PreferenceSelfThis::PREFER_SELF(),
TestCase::class => 'prefer_self',
]);
};
```
@ -5413,6 +5414,26 @@ Add parentheses around non-dereferenceable expressions.
<br>
### DowngradeEnumToConstantListClassRector
Downgrade enum to constant list class
- class: [`Rector\DowngradePhp80\Rector\Enum_\DowngradeEnumToConstantListClassRector`](../rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php)
```diff
-enum Direction
+class Direction
{
- case LEFT;
+ public const LEFT = 'left';
- case RIGHT;
+ public const RIGHT = 'right';
}
```
<br>
### DowngradeMatchToSwitchRector
Downgrade `match()` to `switch()`
@ -6050,6 +6071,30 @@ Remove "readonly" property type, add a "@readonly" tag instead
<br>
## DowngradePhp82
### DowngradeReadonlyClassRector
Remove "readonly" class type, decorate all properties to "readonly"
- class: [`Rector\DowngradePhp82\Rector\Class_\DowngradeReadonlyClassRector`](../rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php)
```diff
-final readonly class SomeClass
+final class SomeClass
{
- public string $foo;
+ public readonly string $foo;
public function __construct()
{
$this->foo = 'foo';
}
}
```
<br>
## EarlyReturn
### ChangeAndIfToEarlyReturnRector
@ -8178,6 +8223,26 @@ Change simple property init and assign to constructor promotion
<br>
### ConstantListClassToEnumRector
Upgrade constant list classes to full blown enum
- class: [`Rector\Php80\Rector\Class_\ConstantListClassToEnumRector`](../rules/Php80/Rector/Class_/ConstantListClassToEnumRector.php)
```diff
-class Direction
+enum Direction
{
- public const LEFT = 'left';
+ case LEFT;
- public const RIGHT = 'right';
+ case RIGHT;
}
```
<br>
### DoctrineAnnotationClassToAttributeRector
Refactor Doctrine `@annotation` annotated class to a PHP 8.0 attribute class

View File

@ -0,0 +1,90 @@
<?php
declare (strict_types=1);
namespace Rector\DowngradePhp80\NodeAnalyzer;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\Enum_;
use PhpParser\Node\Stmt\EnumCase;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\PhpParser\AstResolver;
use Rector\NodeTypeResolver\NodeTypeResolver;
final class EnumAnalyzer
{
/**
* @readonly
* @var \Rector\Core\PhpParser\AstResolver
*/
private $astResolver;
/**
* @readonly
* @var \Rector\NodeTypeResolver\NodeTypeResolver
*/
private $nodeTypeResolver;
public function __construct(\Rector\Core\PhpParser\AstResolver $astResolver, \Rector\NodeTypeResolver\NodeTypeResolver $nodeTypeResolver)
{
$this->astResolver = $astResolver;
$this->nodeTypeResolver = $nodeTypeResolver;
}
public function resolveType(\PHPStan\Reflection\ClassReflection $classReflection) : ?\PhpParser\Node\Identifier
{
$class = $this->astResolver->resolveClassFromClassReflection($classReflection, $classReflection->getName());
if (!$class instanceof \PhpParser\Node\Stmt\Enum_) {
throw new \Rector\Core\Exception\ShouldNotHappenException();
}
$scalarType = $class->scalarType;
if ($scalarType instanceof \PhpParser\Node\Identifier) {
// can be only int or string
return $scalarType;
}
$enumExprTypes = $this->resolveEnumExprTypes($class);
$enumExprTypeClasses = [];
foreach ($enumExprTypes as $enumExprType) {
$enumExprTypeClasses[] = \get_class($enumExprType);
}
$uniqueEnumExprTypeClasses = \array_unique($enumExprTypeClasses);
if (\count($uniqueEnumExprTypeClasses) === 1) {
$uniqueEnumExprTypeClass = $uniqueEnumExprTypeClasses[0];
if (\is_a($uniqueEnumExprTypeClass, \PHPStan\Type\StringType::class, \true)) {
return new \PhpParser\Node\Identifier('string');
}
if (\is_a($uniqueEnumExprTypeClass, \PHPStan\Type\IntegerType::class, \true)) {
return new \PhpParser\Node\Identifier('int');
}
if (\is_a($uniqueEnumExprTypeClass, \PHPStan\Type\FloatType::class, \true)) {
return new \PhpParser\Node\Identifier('float');
}
}
// unknown or multiple types
return null;
}
/**
* @return Type[]
*/
private function resolveEnumExprTypes(\PhpParser\Node\Stmt\Enum_ $enum) : array
{
$enumExprTypes = [];
foreach ($enum->stmts as $classStmt) {
if (!$classStmt instanceof \PhpParser\Node\Stmt\EnumCase) {
continue;
}
$enumExprTypes[] = $this->resolveEnumCaseType($classStmt);
}
return $enumExprTypes;
}
private function resolveEnumCaseType(\PhpParser\Node\Stmt\EnumCase $enumCase) : \PHPStan\Type\Type
{
$classExpr = $enumCase->expr;
if ($classExpr instanceof \PhpParser\Node\Expr) {
return $this->nodeTypeResolver->getType($classExpr);
}
// in case of no value, fallback to string type
return new \PHPStan\Type\StringType();
}
}

View File

@ -4,9 +4,20 @@ declare (strict_types=1);
namespace Rector\DowngradePhp80\Rector\Enum_;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Enum_;
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
use Rector\Core\Rector\AbstractRector;
use Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer;
use Rector\Php81\NodeFactory\ClassFromEnumFactory;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -20,9 +31,21 @@ final class DowngradeEnumToConstantListClassRector extends \Rector\Core\Rector\A
* @var \Rector\Php81\NodeFactory\ClassFromEnumFactory
*/
private $classFromEnumFactory;
public function __construct(\Rector\Php81\NodeFactory\ClassFromEnumFactory $classFromEnumFactory)
/**
* @readonly
* @var \PHPStan\Reflection\ReflectionProvider
*/
private $reflectionProvider;
/**
* @readonly
* @var \Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer
*/
private $enumAnalyzer;
public function __construct(\Rector\Php81\NodeFactory\ClassFromEnumFactory $classFromEnumFactory, \PHPStan\Reflection\ReflectionProvider $reflectionProvider, \Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer $enumAnalyzer)
{
$this->classFromEnumFactory = $classFromEnumFactory;
$this->reflectionProvider = $reflectionProvider;
$this->enumAnalyzer = $enumAnalyzer;
}
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
{
@ -49,13 +72,51 @@ CODE_SAMPLE
*/
public function getNodeTypes() : array
{
return [\PhpParser\Node\Stmt\Enum_::class];
return [\PhpParser\Node\Stmt\Enum_::class, \PhpParser\Node\Stmt\ClassMethod::class];
}
/**
* @param Enum_ $node
* @param Enum_|ClassMethod $node
* @return \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\ClassMethod|null
*/
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\Class_
public function refactor(\PhpParser\Node $node)
{
return $this->classFromEnumFactory->createFromEnum($node);
if ($node instanceof \PhpParser\Node\Stmt\Enum_) {
return $this->classFromEnumFactory->createFromEnum($node);
}
$hasChanged = \false;
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
foreach ($node->params as $param) {
if (!$param->type instanceof \PhpParser\Node\Name) {
continue;
}
// is enum type?
$typeName = $this->getName($param->type);
if (!$this->reflectionProvider->hasClass($typeName)) {
continue;
}
$classLikeReflection = $this->reflectionProvider->getClass($typeName);
if (!$classLikeReflection->isEnum()) {
continue;
}
$param->type = $this->resolveParamType($classLikeReflection);
$hasChanged = \true;
$this->decorateParamDocType($classLikeReflection, $param, $phpDocInfo);
}
if ($hasChanged) {
return $node;
}
return null;
}
public function resolveParamType(\PHPStan\Reflection\ClassReflection $classReflection) : ?\PhpParser\Node\Identifier
{
return $this->enumAnalyzer->resolveType($classReflection);
}
private function decorateParamDocType(\PHPStan\Reflection\ClassReflection $classReflection, \PhpParser\Node\Param $param, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo $phpDocInfo) : void
{
$constFetchNode = new \PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode('\\' . $classReflection->getName(), '*');
$constTypeNode = new \PHPStan\PhpDocParser\Ast\Type\ConstTypeNode($constFetchNode);
$paramName = '$' . $this->getName($param);
$paramTagValueNode = new \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode($constTypeNode, \false, $paramName, '');
$phpDocInfo->addTagValueNode($paramTagValueNode);
}
}

View File

@ -48,7 +48,7 @@ final readonly class SomeClass
}
CODE_SAMPLE
, <<<'CODE_SAMPLE'
final readonly class SomeClass
final class SomeClass
{
public readonly string $foo;

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '340f5b999c86387ef9b8fb6297516c564208ee2a';
public const PACKAGE_VERSION = 'e368dabaed1f3246962720aaa5236653823bba2b';
/**
* @var string
*/
public const RELEASE_DATE = '2022-06-02 13:56:11';
public const RELEASE_DATE = '2022-06-02 15:08:06';
/**
* @var int
*/

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Core\NodeAnalyzer;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassConst;
use Rector\Core\PhpParser\Node\BetterNodeFinder;
@ -33,7 +34,7 @@ final class EnumAnalyzer
if (!$class instanceof \PhpParser\Node\Stmt\Class_) {
return \false;
}
if ($class->extends === null) {
if (!$class->extends instanceof \PhpParser\Node\Name) {
return \false;
}
return $this->nodeNameResolver->isName($class->extends, '*Enum');

View File

@ -18,7 +18,7 @@ final class ClassLikeAstResolver
* Parsing files is very heavy performance, so this will help to leverage it
* The value can be also null, as the method might not exist in the class.
*
* @var array<class-string, Class_|Trait_|Interface_|null>
* @var array<class-string, Class_|Trait_|Interface_|Enum_|null>
*/
private $classLikesByName = [];
/**
@ -39,7 +39,7 @@ final class ClassLikeAstResolver
/**
* @return \PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Enum_|null
*/
public function resolveClassFromClassReflection(\PHPStan\Reflection\ClassReflection $classReflection, string $className)
public function resolveClassFromClassReflection(\PHPStan\Reflection\ClassReflection $classReflection, string $desiredClassName)
{
if ($classReflection->isBuiltin()) {
return null;
@ -60,11 +60,11 @@ final class ClassLikeAstResolver
$this->classLikesByName[$classReflection->getName()] = null;
return null;
}
/** @var array<Class_|Trait_|Interface_> $classLikes */
/** @var array<Class_|Trait_|Interface_|Enum_> $classLikes */
$classLikes = $this->betterNodeFinder->findInstanceOf($stmts, \PhpParser\Node\Stmt\ClassLike::class);
$reflectionClassName = $classReflection->getName();
foreach ($classLikes as $classLike) {
if ($reflectionClassName !== $className) {
if ($reflectionClassName !== $desiredClassName) {
continue;
}
$this->classLikesByName[$classReflection->getName()] = $classLike;

2
vendor/autoload.php vendored
View File

@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d::getLoader();
return ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe::getLoader();

View File

@ -1982,6 +1982,7 @@ return array(
'Rector\\DowngradePhp74\\Rector\\LNumber\\DowngradeNumericLiteralSeparatorRector' => $baseDir . '/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php',
'Rector\\DowngradePhp74\\Rector\\MethodCall\\DowngradeReflectionGetTypeRector' => $baseDir . '/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php',
'Rector\\DowngradePhp74\\Rector\\Property\\DowngradeTypedPropertyRector' => $baseDir . '/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\EnumAnalyzer' => $baseDir . '/rules/DowngradePhp80/NodeAnalyzer/EnumAnalyzer.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\NamedToUnnamedArgs' => $baseDir . '/rules/DowngradePhp80/NodeAnalyzer/NamedToUnnamedArgs.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\UnnamedArgumentResolver' => $baseDir . '/rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php',
'Rector\\DowngradePhp80\\Rector\\ArrayDimFetch\\DowngradeDereferenceableOperationRector' => $baseDir . '/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d
class ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5d1be6c7a55a96b27577953683119c6d::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit5d1be6c7a55a96b27577953683119c6d::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire5d1be6c7a55a96b27577953683119c6d($fileIdentifier, $file);
composerRequire940f3ab44f18e543abbf02bae88d4bbe($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d
* @param string $file
* @return void
*/
function composerRequire5d1be6c7a55a96b27577953683119c6d($fileIdentifier, $file)
function composerRequire940f3ab44f18e543abbf02bae88d4bbe($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit5d1be6c7a55a96b27577953683119c6d
class ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -2309,6 +2309,7 @@ class ComposerStaticInit5d1be6c7a55a96b27577953683119c6d
'Rector\\DowngradePhp74\\Rector\\LNumber\\DowngradeNumericLiteralSeparatorRector' => __DIR__ . '/../..' . '/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php',
'Rector\\DowngradePhp74\\Rector\\MethodCall\\DowngradeReflectionGetTypeRector' => __DIR__ . '/../..' . '/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php',
'Rector\\DowngradePhp74\\Rector\\Property\\DowngradeTypedPropertyRector' => __DIR__ . '/../..' . '/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\EnumAnalyzer' => __DIR__ . '/../..' . '/rules/DowngradePhp80/NodeAnalyzer/EnumAnalyzer.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\NamedToUnnamedArgs' => __DIR__ . '/../..' . '/rules/DowngradePhp80/NodeAnalyzer/NamedToUnnamedArgs.php',
'Rector\\DowngradePhp80\\NodeAnalyzer\\UnnamedArgumentResolver' => __DIR__ . '/../..' . '/rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php',
'Rector\\DowngradePhp80\\Rector\\ArrayDimFetch\\DowngradeDereferenceableOperationRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php',
@ -3790,9 +3791,9 @@ class ComposerStaticInit5d1be6c7a55a96b27577953683119c6d
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit5d1be6c7a55a96b27577953683119c6d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5d1be6c7a55a96b27577953683119c6d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5d1be6c7a55a96b27577953683119c6d::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit940f3ab44f18e543abbf02bae88d4bbe::$classMap;
}, null, ClassLoader::class);
}

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220602\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d', false) && !interface_exists('ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d', false) && !trait_exists('ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d', false)) {
spl_autoload_call('RectorPrefix20220602\ComposerAutoloaderInit5d1be6c7a55a96b27577953683119c6d');
if (!class_exists('ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe', false) && !interface_exists('ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe', false) && !trait_exists('ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe', false)) {
spl_autoload_call('RectorPrefix20220602\ComposerAutoloaderInit940f3ab44f18e543abbf02bae88d4bbe');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220602\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220602\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire5d1be6c7a55a96b27577953683119c6d')) {
function composerRequire5d1be6c7a55a96b27577953683119c6d() {
return \RectorPrefix20220602\composerRequire5d1be6c7a55a96b27577953683119c6d(...func_get_args());
if (!function_exists('composerRequire940f3ab44f18e543abbf02bae88d4bbe')) {
function composerRequire940f3ab44f18e543abbf02bae88d4bbe() {
return \RectorPrefix20220602\composerRequire940f3ab44f18e543abbf02bae88d4bbe(...func_get_args());
}
}
if (!function_exists('scanPath')) {