Updated Rector to commit 2a18c59a0c0d7e56cb80c8fedfeb4452745e5501

2a18c59a0c [DowngradePhp80] Add DowngradeReflectionClassGetConstantsFilterRector (#1529)
This commit is contained in:
Tomas Votruba 2021-12-20 12:16:44 +00:00
parent e888119375
commit 09776f16ae
11 changed files with 287 additions and 25 deletions

View File

@ -23,6 +23,7 @@ use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRecto
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector;
use Rector\DowngradePhp80\Rector\Instanceof_\DowngradePhp80ResourceReturnToObjectRector;
use Rector\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector;
use Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector;
use Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector;
use Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector;
use Rector\DowngradePhp80\Rector\New_\DowngradeArbitraryExpressionsSupportRector;
@ -69,4 +70,5 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector::class);
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector::class);
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector::class);
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector::class);
};

View File

@ -0,0 +1,29 @@
<?php
declare (strict_types=1);
namespace Rector\NodeCollector\NodeAnalyzer;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
final class BitwiseOrAnalyzer
{
/**
* @return Expr[]
*/
public function findBitwiseOrConditions(\PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr) : array
{
$conditions = [];
/** @var BinaryOp|Expr $bitwiseOr */
while ($bitwiseOr instanceof \PhpParser\Node\Expr\BinaryOp) {
$conditions[] = $bitwiseOr->right;
$bitwiseOr = $bitwiseOr->left;
if (!$bitwiseOr instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
$conditions[] = $bitwiseOr;
break;
}
}
\krsort($conditions);
return $conditions;
}
}

View File

@ -14,6 +14,7 @@ final class BooleanAndAnalyzer
public function findBooleanAndConditions(\PhpParser\Node\Expr\BinaryOp\BooleanAnd $booleanAnd) : array
{
$conditions = [];
/** @var BinaryOp|Expr $booleanAnd */
while ($booleanAnd instanceof \PhpParser\Node\Expr\BinaryOp) {
$conditions[] = $booleanAnd->right;
$booleanAnd = $booleanAnd->left;

View File

@ -0,0 +1,219 @@
<?php
declare (strict_types=1);
namespace Rector\DowngradePhp80\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\ClosureUse;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PHPStan\Type\ObjectType;
use Rector\Core\NodeManipulator\IfManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\Naming\Naming\VariableNaming;
use Rector\NodeCollector\NodeAnalyzer\BitwiseOrAnalyzer;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector\DowngradeReflectionClassGetConstantsFilterRectorTest
*/
final class DowngradeReflectionClassGetConstantsFilterRector extends \Rector\Core\Rector\AbstractRector
{
/**
* @var array<string, string>
*/
private const MAP_CONSTANT_TO_METHOD = ['IS_PUBLIC' => 'isPublic', 'IS_PROTECTED' => 'isProtected', 'IS_PRIVATE' => 'isPrivate'];
/**
* @readonly
* @var \Rector\Naming\Naming\VariableNaming
*/
private $variableNaming;
/**
* @readonly
* @var \Rector\Core\NodeManipulator\IfManipulator
*/
private $ifManipulator;
/**
* @readonly
* @var \Rector\NodeCollector\NodeAnalyzer\BitwiseOrAnalyzer
*/
private $bitwiseOrAnalyzer;
public function __construct(\Rector\Naming\Naming\VariableNaming $variableNaming, \Rector\Core\NodeManipulator\IfManipulator $ifManipulator, \Rector\NodeCollector\NodeAnalyzer\BitwiseOrAnalyzer $bitwiseOrAnalyzer)
{
$this->variableNaming = $variableNaming;
$this->ifManipulator = $ifManipulator;
$this->bitwiseOrAnalyzer = $bitwiseOrAnalyzer;
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [\PhpParser\Node\Expr\MethodCall::class];
}
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
{
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Downgrade ReflectionClass->getConstants(ReflectionClassConstant::IS_*)', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
$reflectionClass = new ReflectionClass('SomeClass');
$constants = $reflectionClass->getConstants(ReflectionClassConstant::IS_PUBLIC));
CODE_SAMPLE
, <<<'CODE_SAMPLE'
$reflectionClass = new ReflectionClass('SomeClass');
$reflectionClassConstants = $reflectionClass->getReflectionConstants();
$result = [];
array_walk($reflectionClassConstants, function ($value) use (&$result) {
if ($value->isPublic()) {
$result[$value->getName()] = $value->getValue();
}
});
$constants = $result;
CODE_SAMPLE
)]);
}
/**
* @param MethodCall $node
*/
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
{
if ($this->shouldSkip($node)) {
return null;
}
$args = $node->getArgs();
$value = $args[0]->value;
if (!\in_array(\get_class($value), [\PhpParser\Node\Expr\ClassConstFetch::class, \PhpParser\Node\Expr\BinaryOp\BitwiseOr::class], \true)) {
return null;
}
$classConstFetchNames = [];
if ($value instanceof \PhpParser\Node\Expr\ClassConstFetch) {
$classConstFetchName = $this->resolveClassConstFetchName($value);
if (\is_string($classConstFetchName)) {
$classConstFetchNames = [$classConstFetchName];
}
}
if ($value instanceof \PhpParser\Node\Expr\BinaryOp\BitwiseOr) {
$classConstFetchNames = $this->resolveClassConstFetchNames($value);
}
if ($classConstFetchNames !== []) {
return $this->processClassConstFetches($node, $classConstFetchNames);
}
return null;
}
/**
* @param string[] $classConstFetchNames
*/
private function processClassConstFetches(\PhpParser\Node\Expr\MethodCall $methodCall, array $classConstFetchNames) : ?\PhpParser\Node\Expr\Variable
{
$scope = $methodCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
$reflectionClassConstants = $this->variableNaming->createCountedValueName('reflectionClassConstants', $scope);
$currentStmt = $methodCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT);
if (!$currentStmt instanceof \PhpParser\Node\Stmt) {
return null;
}
$variableReflectionClassConstants = new \PhpParser\Node\Expr\Variable($this->variableNaming->createCountedValueName($reflectionClassConstants, $scope));
$assign = new \PhpParser\Node\Expr\Assign($variableReflectionClassConstants, new \PhpParser\Node\Expr\MethodCall($methodCall->var, 'getReflectionConstants'));
$this->addNodeBeforeNode(new \PhpParser\Node\Stmt\Expression($assign), $currentStmt);
$result = $this->variableNaming->createCountedValueName('result', $scope);
$variableResult = new \PhpParser\Node\Expr\Variable($result);
$assignVariableResult = new \PhpParser\Node\Expr\Assign($variableResult, new \PhpParser\Node\Expr\Array_());
$this->addNodeBeforeNode(new \PhpParser\Node\Stmt\Expression($assignVariableResult), $currentStmt);
$ifs = [];
$valueVariable = new \PhpParser\Node\Expr\Variable('value');
$key = new \PhpParser\Node\Expr\MethodCall($valueVariable, 'getName');
$value = new \PhpParser\Node\Expr\MethodCall($valueVariable, 'getValue');
$arrayDimFetch = new \PhpParser\Node\Expr\ArrayDimFetch($variableResult, $key);
$assignValue = $value;
foreach ($classConstFetchNames as $classConstFetchName) {
$methodCallName = self::MAP_CONSTANT_TO_METHOD[$classConstFetchName];
$ifs[] = $this->ifManipulator->createIfExpr(new \PhpParser\Node\Expr\MethodCall($valueVariable, $methodCallName), new \PhpParser\Node\Stmt\Expression(new \PhpParser\Node\Expr\Assign($arrayDimFetch, $assignValue)));
}
$closure = new \PhpParser\Node\Expr\Closure();
$closure->params = [new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable('value'))];
$closure->uses = [new \PhpParser\Node\Expr\ClosureUse($variableResult, \true)];
$closure->stmts = $ifs;
$funcCall = $this->nodeFactory->createFuncCall('array_walk', [$variableReflectionClassConstants, $closure]);
$this->addNodeBeforeNode(new \PhpParser\Node\Stmt\Expression($funcCall), $currentStmt);
return $variableResult;
}
private function resolveClassConstFetchName(\PhpParser\Node\Expr\ClassConstFetch $classConstFetch) : ?string
{
if ($this->shouldSkipClassConstFetch($classConstFetch)) {
return null;
}
/** @var Identifier $name */
$name = $classConstFetch->name;
return $name->toString();
}
/**
* @return string[]
*/
private function resolveClassConstFetchNames(\PhpParser\Node\Expr\BinaryOp\BitwiseOr $bitwiseOr) : array
{
$values = $this->bitwiseOrAnalyzer->findBitwiseOrConditions($bitwiseOr);
if ($this->shouldSkipBitwiseOrValues($values)) {
return [];
}
$classConstFetchNames = [];
/** @var ClassConstFetch[] $values */
foreach ($values as $value) {
/** @var Identifier $name */
$name = $value->name;
$classConstFetchNames[] = $name->toString();
}
return \array_unique($classConstFetchNames);
}
/**
* @param Node[] $values
*/
private function shouldSkipBitwiseOrValues(array $values) : bool
{
foreach ($values as $value) {
if (!$value instanceof \PhpParser\Node\Expr\ClassConstFetch) {
return \true;
}
if ($this->shouldSkipClassConstFetch($value)) {
return \true;
}
}
return \false;
}
private function shouldSkipClassConstFetch(\PhpParser\Node\Expr\ClassConstFetch $classConstFetch) : bool
{
if (!$classConstFetch->class instanceof \PhpParser\Node\Name\FullyQualified) {
return \true;
}
if ($classConstFetch->class->toString() !== 'ReflectionClassConstant') {
return \true;
}
if (!$classConstFetch->name instanceof \PhpParser\Node\Identifier) {
return \true;
}
$constants = \array_keys(self::MAP_CONSTANT_TO_METHOD);
return !$this->nodeNameResolver->isNames($classConstFetch->name, $constants);
}
private function shouldSkip(\PhpParser\Node\Expr\MethodCall $methodCall) : bool
{
if (!$this->nodeNameResolver->isName($methodCall->name, 'getConstants')) {
return \true;
}
$varType = $this->nodeTypeResolver->getType($methodCall->var);
if (!$varType instanceof \PHPStan\Type\ObjectType) {
return \true;
}
if ($varType->getClassName() !== 'ReflectionClass') {
return \true;
}
return $methodCall->getArgs() === [];
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'c4ffdb5d8e724c3a3142e912e481111240e01d82';
public const PACKAGE_VERSION = '2a18c59a0c0d7e56cb80c8fedfeb4452745e5501';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-20 12:57:47';
public const RELEASE_DATE = '2021-12-20 12:58:31';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211220\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -5,6 +5,7 @@ namespace Rector\Core\DependencyInjection\Collector;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use ReflectionClass;
use ReflectionClassConstant;
use RectorPrefix20211220\Symfony\Component\Console\Style\SymfonyStyle;
use RectorPrefix20211220\Symfony\Component\DependencyInjection\Definition;
use RectorPrefix20211220\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
@ -66,14 +67,20 @@ final class ConfigureCallValuesCollector
// fixes bug when 1 item is unwrapped and treated as constant key, without rule having public constant
$classReflection = new \ReflectionClass($rectorClass);
$reflectionClassConstants = $classReflection->getReflectionConstants();
foreach ($reflectionClassConstants as $reflectionClassConstant) {
if (!$reflectionClassConstant->isPublic()) {
continue;
$result = [];
\array_walk($reflectionClassConstants, function ($value) use(&$result) {
if ($value->isPublic()) {
$result[$value->getName()] = $value->getValue();
}
$constantValue = $reflectionClassConstant->getValue();
$constantName = $reflectionClassConstant->getName();
});
$constantNamesToValues = $result;
foreach ($constantNamesToValues as $constantName => $constantValue) {
if ($constantValue === $firstKey) {
if (\strpos((string) $reflectionClassConstant->getDocComment(), '@deprecated') === \false) {
$reflectionConstant = $classReflection->getReflectionConstant($constantName);
if ($reflectionConstant === \false) {
continue;
}
if (\strpos((string) $reflectionConstant->getDocComment(), '@deprecated') === \false) {
continue;
}
$warningMessage = \sprintf('The constant for "%s::%s" is deprecated.%sUse "->configure()" directly instead.', $rectorClass, $constantName, \PHP_EOL);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9::getLoader();
return ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6::getLoader();

View File

@ -2029,6 +2029,7 @@ return array(
'Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeUnionTypeDeclarationRector' => $baseDir . '/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php',
'Rector\\DowngradePhp80\\Rector\\Instanceof_\\DowngradePhp80ResourceReturnToObjectRector' => $baseDir . '/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeNamedArgumentRector' => $baseDir . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionClassGetConstantsFilterRector' => $baseDir . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionGetAttributesRector' => $baseDir . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionPropertyGetDefaultValueRector' => $baseDir . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php',
'Rector\\DowngradePhp80\\Rector\\New_\\DowngradeArbitraryExpressionsSupportRector' => $baseDir . '/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php',
@ -2294,6 +2295,7 @@ return array(
'Rector\\Nette\\ValueObject\\ParameterAssign' => $vendorDir . '/rector/rector-nette/src/ValueObject/ParameterAssign.php',
'Rector\\Nette\\ValueObject\\TemplateParametersAssigns' => $vendorDir . '/rector/rector-nette/src/ValueObject/TemplateParametersAssigns.php',
'Rector\\NodeCollector\\NodeAnalyzer\\ArrayCallableMethodMatcher' => $baseDir . '/packages/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php',
'Rector\\NodeCollector\\NodeAnalyzer\\BitwiseOrAnalyzer' => $baseDir . '/packages/NodeCollector/NodeAnalyzer/BitwiseOrAnalyzer.php',
'Rector\\NodeCollector\\NodeAnalyzer\\BooleanAndAnalyzer' => $baseDir . '/packages/NodeCollector/NodeAnalyzer/BooleanAndAnalyzer.php',
'Rector\\NodeCollector\\ScopeResolver\\ParentClassScopeResolver' => $baseDir . '/packages/NodeCollector/ScopeResolver/ParentClassScopeResolver.php',
'Rector\\NodeCollector\\StaticAnalyzer' => $baseDir . '/packages/NodeCollector/StaticAnalyzer.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9
class ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire92bcbf4746a781392c39f1d4f13799d9($fileIdentifier, $file);
composerRequire3a9b1668a40dbf3ebdc3b03c1bd148a6($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire92bcbf4746a781392c39f1d4f13799d9($fileIdentifier, $file)
function composerRequire3a9b1668a40dbf3ebdc3b03c1bd148a6($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9
class ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -2424,6 +2424,7 @@ class ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9
'Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeUnionTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php',
'Rector\\DowngradePhp80\\Rector\\Instanceof_\\DowngradePhp80ResourceReturnToObjectRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeNamedArgumentRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionClassGetConstantsFilterRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionGetAttributesRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php',
'Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionPropertyGetDefaultValueRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php',
'Rector\\DowngradePhp80\\Rector\\New_\\DowngradeArbitraryExpressionsSupportRector' => __DIR__ . '/../..' . '/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php',
@ -2689,6 +2690,7 @@ class ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9
'Rector\\Nette\\ValueObject\\ParameterAssign' => __DIR__ . '/..' . '/rector/rector-nette/src/ValueObject/ParameterAssign.php',
'Rector\\Nette\\ValueObject\\TemplateParametersAssigns' => __DIR__ . '/..' . '/rector/rector-nette/src/ValueObject/TemplateParametersAssigns.php',
'Rector\\NodeCollector\\NodeAnalyzer\\ArrayCallableMethodMatcher' => __DIR__ . '/../..' . '/packages/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php',
'Rector\\NodeCollector\\NodeAnalyzer\\BitwiseOrAnalyzer' => __DIR__ . '/../..' . '/packages/NodeCollector/NodeAnalyzer/BitwiseOrAnalyzer.php',
'Rector\\NodeCollector\\NodeAnalyzer\\BooleanAndAnalyzer' => __DIR__ . '/../..' . '/packages/NodeCollector/NodeAnalyzer/BooleanAndAnalyzer.php',
'Rector\\NodeCollector\\ScopeResolver\\ParentClassScopeResolver' => __DIR__ . '/../..' . '/packages/NodeCollector/ScopeResolver/ParentClassScopeResolver.php',
'Rector\\NodeCollector\\StaticAnalyzer' => __DIR__ . '/../..' . '/packages/NodeCollector/StaticAnalyzer.php',
@ -3830,9 +3832,9 @@ class ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit92bcbf4746a781392c39f1d4f13799d9::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3a9b1668a40dbf3ebdc3b03c1bd148a6::$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('RectorPrefix20211220\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9', false) && !interface_exists('ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9', false) && !trait_exists('ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9', false)) {
spl_autoload_call('RectorPrefix20211220\ComposerAutoloaderInit92bcbf4746a781392c39f1d4f13799d9');
if (!class_exists('ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6', false) && !interface_exists('ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6', false) && !trait_exists('ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6', false)) {
spl_autoload_call('RectorPrefix20211220\ComposerAutoloaderInit3a9b1668a40dbf3ebdc3b03c1bd148a6');
}
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('RectorPrefix20211220\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -78,9 +78,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211220\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire92bcbf4746a781392c39f1d4f13799d9')) {
function composerRequire92bcbf4746a781392c39f1d4f13799d9() {
return \RectorPrefix20211220\composerRequire92bcbf4746a781392c39f1d4f13799d9(...func_get_args());
if (!function_exists('composerRequire3a9b1668a40dbf3ebdc3b03c1bd148a6')) {
function composerRequire3a9b1668a40dbf3ebdc3b03c1bd148a6() {
return \RectorPrefix20211220\composerRequire3a9b1668a40dbf3ebdc3b03c1bd148a6(...func_get_args());
}
}
if (!function_exists('scanPath')) {