mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 672df31993b36396c3987bf6082f6218ba5cd26c
672df31993
Remove UnSpreadOperatorRector as not clear value and spread used on purpose (#4949)
This commit is contained in:
parent
b687f1d77e
commit
5102d25a1e
@ -12,7 +12,6 @@ use Rector\CodingStyle\Rector\ClassConst\SplitGroupedClassConstantsRector;
|
||||
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
|
||||
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
|
||||
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
|
||||
use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector;
|
||||
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
|
||||
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
|
||||
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
|
||||
@ -38,5 +37,5 @@ use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;
|
||||
use Rector\Visibility\Rector\ClassMethod\ExplicitPublicClassMethodRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->ruleWithConfiguration(FuncCallToConstFetchRector::class, ['php_sapi_name' => 'PHP_SAPI', 'pi' => 'M_PI']);
|
||||
$rectorConfig->rules([SeparateMultiUseImportsRector::class, PostIncDecToPreIncDecRector::class, UnSpreadOperatorRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, StringClassNameToClassConstantRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class, UseClassKeywordForClassNameResolutionRector::class, SplitGroupedPropertiesRector::class, SplitGroupedClassConstantsRector::class, ExplicitPublicClassMethodRector::class]);
|
||||
$rectorConfig->rules([SeparateMultiUseImportsRector::class, PostIncDecToPreIncDecRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, StringClassNameToClassConstantRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class, UseClassKeywordForClassNameResolutionRector::class, SplitGroupedPropertiesRector::class, SplitGroupedClassConstantsRector::class, ExplicitPublicClassMethodRector::class]);
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 355 Rules Overview
|
||||
# 353 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
- [CodeQuality](#codequality) (71)
|
||||
|
||||
- [CodingStyle](#codingstyle) (30)
|
||||
- [CodingStyle](#codingstyle) (29)
|
||||
|
||||
- [DeadCode](#deadcode) (41)
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
- [Removing](#removing) (5)
|
||||
|
||||
- [Renaming](#renaming) (10)
|
||||
- [Renaming](#renaming) (9)
|
||||
|
||||
- [Strict](#strict) (5)
|
||||
|
||||
@ -2047,30 +2047,6 @@ Assign outcome of ternary condition to variable, where applicable
|
||||
|
||||
<br>
|
||||
|
||||
### UnSpreadOperatorRector
|
||||
|
||||
Remove spread operator
|
||||
|
||||
- class: [`Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector`](../rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
- public function run(...$array)
|
||||
+ public function run(array $array)
|
||||
{
|
||||
}
|
||||
|
||||
public function execute(array $data)
|
||||
{
|
||||
- $this->run(...$data);
|
||||
+ $this->run($data);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### UseClassKeywordForClassNameResolutionRector
|
||||
|
||||
Use `class` keyword for class name resolution in string instead of hardcoded string reference
|
||||
@ -5456,24 +5432,6 @@ Remove specific traits from code
|
||||
|
||||
## Renaming
|
||||
|
||||
### PseudoNamespaceToNamespaceRector
|
||||
|
||||
Replaces defined Pseudo_Namespaces by Namespace\Ones.
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Renaming\Rector\FileWithoutNamespace\PseudoNamespaceToNamespaceRector`](../rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php)
|
||||
|
||||
```diff
|
||||
-/** @var Some_Chicken $someService */
|
||||
-$someService = new Some_Chicken;
|
||||
+/** @var Some\Chicken $someService */
|
||||
+$someService = new Some\Chicken;
|
||||
$someClassToKeep = new Some_Class_To_Keep;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### RenameAnnotationRector
|
||||
|
||||
Turns defined annotations above properties and methods to their new values.
|
||||
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\CodingStyle\NodeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Param;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Reflection\ParameterReflection;
|
||||
use PHPStan\Reflection\ParametersAcceptor;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
final class SpreadVariablesCollector
|
||||
{
|
||||
/**
|
||||
* @return array<int, ParameterReflection>
|
||||
*/
|
||||
public function resolveFromParametersAcceptor(ParametersAcceptor $parametersAcceptor) : array
|
||||
{
|
||||
$spreadParameterReflections = [];
|
||||
foreach ($parametersAcceptor->getParameters() as $key => $parameterReflection) {
|
||||
if (!$parameterReflection->isVariadic()) {
|
||||
continue;
|
||||
}
|
||||
$spreadParameterReflections[$key] = $parameterReflection;
|
||||
}
|
||||
return $spreadParameterReflections;
|
||||
}
|
||||
/**
|
||||
* @return array<int, Param>
|
||||
*/
|
||||
public function resolveFromClassMethod(ClassMethod $classMethod) : array
|
||||
{
|
||||
/** @var array<int, Param> $spreadParams */
|
||||
$spreadParams = [];
|
||||
foreach ($classMethod->params as $key => $param) {
|
||||
// prevent race-condition removal on class method
|
||||
$originalParam = $param->getAttribute(AttributeKey::ORIGINAL_NODE);
|
||||
if (!$originalParam instanceof Param) {
|
||||
continue;
|
||||
}
|
||||
if (!$originalParam->variadic) {
|
||||
continue;
|
||||
}
|
||||
$spreadParams[$key] = $param;
|
||||
}
|
||||
return $spreadParams;
|
||||
}
|
||||
}
|
@ -1,222 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\CodingStyle\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Identifier;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\MethodReflection;
|
||||
use PHPStan\Reflection\ParametersAcceptorSelector;
|
||||
use Rector\CodingStyle\NodeAnalyzer\SpreadVariablesCollector;
|
||||
use Rector\CodingStyle\Reflection\VendorLocationDetector;
|
||||
use Rector\Core\Rector\AbstractScopeAwareRector;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector\UnSpreadOperatorRectorTest
|
||||
*/
|
||||
final class UnSpreadOperatorRector extends AbstractScopeAwareRector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\CodingStyle\NodeAnalyzer\SpreadVariablesCollector
|
||||
*/
|
||||
private $spreadVariablesCollector;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\CodingStyle\Reflection\VendorLocationDetector
|
||||
*/
|
||||
private $vendorLocationDetector;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer
|
||||
*/
|
||||
private $classChildAnalyzer;
|
||||
public function __construct(SpreadVariablesCollector $spreadVariablesCollector, ReflectionResolver $reflectionResolver, VendorLocationDetector $vendorLocationDetector, ClassChildAnalyzer $classChildAnalyzer)
|
||||
{
|
||||
$this->spreadVariablesCollector = $spreadVariablesCollector;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->vendorLocationDetector = $vendorLocationDetector;
|
||||
$this->classChildAnalyzer = $classChildAnalyzer;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Remove spread operator', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
public function run(...$array)
|
||||
{
|
||||
}
|
||||
|
||||
public function execute(array $data)
|
||||
{
|
||||
$this->run(...$data);
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
public function run(array $array)
|
||||
{
|
||||
}
|
||||
|
||||
public function execute(array $data)
|
||||
{
|
||||
$this->run($data);
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [ClassMethod::class, MethodCall::class];
|
||||
}
|
||||
/**
|
||||
* @param ClassMethod|MethodCall $node
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?Node
|
||||
{
|
||||
if ($node instanceof ClassMethod) {
|
||||
return $this->refactorClassMethod($node);
|
||||
}
|
||||
return $this->refactorMethodCall($node, $scope);
|
||||
}
|
||||
private function refactorClassMethod(ClassMethod $classMethod) : ?ClassMethod
|
||||
{
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
if ($this->isInPHPUnitTestCase($classReflection, $classMethod)) {
|
||||
return null;
|
||||
}
|
||||
$methodName = $this->nodeNameResolver->getName($classMethod);
|
||||
if ($this->classChildAnalyzer->hasParentClassMethod($classReflection, $methodName)) {
|
||||
return null;
|
||||
}
|
||||
$spreadParams = $this->spreadVariablesCollector->resolveFromClassMethod($classMethod);
|
||||
if ($spreadParams === []) {
|
||||
return null;
|
||||
}
|
||||
foreach ($spreadParams as $spreadParam) {
|
||||
$spreadParam->variadic = \false;
|
||||
$spreadParam->type = new Identifier('array');
|
||||
$spreadParam->default = $this->nodeFactory->createArray([]);
|
||||
}
|
||||
return $classMethod;
|
||||
}
|
||||
private function refactorMethodCall(MethodCall $methodCall, Scope $scope) : ?MethodCall
|
||||
{
|
||||
if ($methodCall->isFirstClassCallable()) {
|
||||
return null;
|
||||
}
|
||||
$methodReflection = $this->reflectionResolver->resolveMethodReflectionFromMethodCall($methodCall);
|
||||
if (!$methodReflection instanceof MethodReflection) {
|
||||
return null;
|
||||
}
|
||||
// skip those in vendor
|
||||
if ($this->vendorLocationDetector->detectMethodReflection($methodReflection)) {
|
||||
return null;
|
||||
}
|
||||
$parametersAcceptor = ParametersAcceptorSelector::selectFromArgs($scope, $methodCall->getArgs(), $methodReflection->getVariants());
|
||||
$spreadParameterReflections = $this->spreadVariablesCollector->resolveFromParametersAcceptor($parametersAcceptor);
|
||||
if ($spreadParameterReflections === []) {
|
||||
return null;
|
||||
}
|
||||
\reset($spreadParameterReflections);
|
||||
$firstSpreadParamPosition = \key($spreadParameterReflections);
|
||||
$variadicArgs = $this->resolveVariadicArgsByVariadicParams($methodCall, $firstSpreadParamPosition);
|
||||
if ($this->hasUnpackedArgs($variadicArgs)) {
|
||||
$this->changeArgToPacked($variadicArgs, $methodCall);
|
||||
return $methodCall;
|
||||
}
|
||||
if ($variadicArgs !== []) {
|
||||
$array = $this->nodeFactory->createArray($variadicArgs);
|
||||
$spreadArg = $methodCall->args[$firstSpreadParamPosition] ?? null;
|
||||
// already set value
|
||||
if ($spreadArg instanceof Arg && $spreadArg->value instanceof Array_) {
|
||||
return null;
|
||||
}
|
||||
if (\count($variadicArgs) === 1) {
|
||||
return null;
|
||||
}
|
||||
$methodCall->args[$firstSpreadParamPosition] = new Arg($array);
|
||||
$this->removeLaterArguments($methodCall, $firstSpreadParamPosition);
|
||||
return $methodCall;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @return Arg[]
|
||||
*/
|
||||
private function resolveVariadicArgsByVariadicParams(MethodCall $methodCall, int $firstSpreadParamPosition) : array
|
||||
{
|
||||
$variadicArgs = [];
|
||||
foreach ($methodCall->args as $position => $arg) {
|
||||
if ($position < $firstSpreadParamPosition) {
|
||||
continue;
|
||||
}
|
||||
if (!$arg instanceof Arg) {
|
||||
continue;
|
||||
}
|
||||
$variadicArgs[] = $arg;
|
||||
}
|
||||
return $variadicArgs;
|
||||
}
|
||||
private function removeLaterArguments(MethodCall $methodCall, int $argumentPosition) : void
|
||||
{
|
||||
$argCount = \count($methodCall->args);
|
||||
for ($i = $argumentPosition + 1; $i < $argCount; ++$i) {
|
||||
unset($methodCall->args[$i]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param Arg[] $variadicArgs
|
||||
*/
|
||||
private function changeArgToPacked(array $variadicArgs, MethodCall $methodCall) : void
|
||||
{
|
||||
foreach ($variadicArgs as $position => $variadicArg) {
|
||||
if ($variadicArg->unpack) {
|
||||
$variadicArg->unpack = \false;
|
||||
$methodCall->args[$position] = $variadicArg;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param Arg[] $args
|
||||
*/
|
||||
private function hasUnpackedArgs(array $args) : bool
|
||||
{
|
||||
foreach ($args as $arg) {
|
||||
if ($arg->unpack) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
private function isInPHPUnitTestCase(ClassReflection $classReflection, ClassMethod $classMethod) : bool
|
||||
{
|
||||
if (!$classMethod->isPublic()) {
|
||||
return \false;
|
||||
}
|
||||
return $classReflection->isSubclassOf('PHPUnit\\Framework\\TestCase');
|
||||
}
|
||||
}
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '048effdf44726307b24df0d9abcb27e7d5be7d3f';
|
||||
public const PACKAGE_VERSION = '672df31993b36396c3987bf6082f6218ba5cd26c';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-09-09 18:07:44';
|
||||
public const RELEASE_DATE = '2023-09-09 13:16:23';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit0adf00c77ea825bd3f6f8ff7362440ee::getLoader();
|
||||
return ComposerAutoloaderInita953e68ac0ba27e05eae6658fac73f10::getLoader();
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -1106,7 +1106,6 @@ return array(
|
||||
'Rector\\CodingStyle\\Contract\\ClassNameImport\\ClassNameImportSkipVoterInterface' => $baseDir . '/rules/CodingStyle/Contract/ClassNameImport/ClassNameImportSkipVoterInterface.php',
|
||||
'Rector\\CodingStyle\\Guard\\StaticGuard' => $baseDir . '/rules/CodingStyle/Guard/StaticGuard.php',
|
||||
'Rector\\CodingStyle\\Naming\\ClassNaming' => $baseDir . '/rules/CodingStyle/Naming/ClassNaming.php',
|
||||
'Rector\\CodingStyle\\NodeAnalyzer\\SpreadVariablesCollector' => $baseDir . '/rules/CodingStyle/NodeAnalyzer/SpreadVariablesCollector.php',
|
||||
'Rector\\CodingStyle\\NodeAnalyzer\\UseImportNameMatcher' => $baseDir . '/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php',
|
||||
'Rector\\CodingStyle\\NodeFactory\\ArrayCallableToMethodCallFactory' => $baseDir . '/rules/CodingStyle/NodeFactory/ArrayCallableToMethodCallFactory.php',
|
||||
'Rector\\CodingStyle\\Node\\NameImporter' => $baseDir . '/rules/CodingStyle/Node/NameImporter.php',
|
||||
@ -1119,7 +1118,6 @@ return array(
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\FuncGetArgsToVariadicParamRector' => $baseDir . '/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\MakeInheritedMethodVisibilitySameAsParentRector' => $baseDir . '/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\NewlineBeforeNewAssignSetRector' => $baseDir . '/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\UnSpreadOperatorRector' => $baseDir . '/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Class_\\AddArrayDefaultToArrayPropertyRector' => $baseDir . '/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Closure\\StaticClosureRector' => $baseDir . '/rules/CodingStyle/Rector/Closure/StaticClosureRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Encapsed\\EncapsedStringsToSprintfRector' => $baseDir . '/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php',
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
class ComposerAutoloaderInita953e68ac0ba27e05eae6658fac73f10
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0adf00c77ea825bd3f6f8ff7362440ee', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInita953e68ac0ba27e05eae6658fac73f10', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0adf00c77ea825bd3f6f8ff7362440ee', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita953e68ac0ba27e05eae6658fac73f10', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita953e68ac0ba27e05eae6658fac73f10::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInita953e68ac0ba27e05eae6658fac73f10::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
10
vendor/composer/autoload_static.php
vendored
10
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
class ComposerStaticInita953e68ac0ba27e05eae6658fac73f10
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -1326,7 +1326,6 @@ class ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
'Rector\\CodingStyle\\Contract\\ClassNameImport\\ClassNameImportSkipVoterInterface' => __DIR__ . '/../..' . '/rules/CodingStyle/Contract/ClassNameImport/ClassNameImportSkipVoterInterface.php',
|
||||
'Rector\\CodingStyle\\Guard\\StaticGuard' => __DIR__ . '/../..' . '/rules/CodingStyle/Guard/StaticGuard.php',
|
||||
'Rector\\CodingStyle\\Naming\\ClassNaming' => __DIR__ . '/../..' . '/rules/CodingStyle/Naming/ClassNaming.php',
|
||||
'Rector\\CodingStyle\\NodeAnalyzer\\SpreadVariablesCollector' => __DIR__ . '/../..' . '/rules/CodingStyle/NodeAnalyzer/SpreadVariablesCollector.php',
|
||||
'Rector\\CodingStyle\\NodeAnalyzer\\UseImportNameMatcher' => __DIR__ . '/../..' . '/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php',
|
||||
'Rector\\CodingStyle\\NodeFactory\\ArrayCallableToMethodCallFactory' => __DIR__ . '/../..' . '/rules/CodingStyle/NodeFactory/ArrayCallableToMethodCallFactory.php',
|
||||
'Rector\\CodingStyle\\Node\\NameImporter' => __DIR__ . '/../..' . '/rules/CodingStyle/Node/NameImporter.php',
|
||||
@ -1339,7 +1338,6 @@ class ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\FuncGetArgsToVariadicParamRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\MakeInheritedMethodVisibilitySameAsParentRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\NewlineBeforeNewAssignSetRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\ClassMethod\\UnSpreadOperatorRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Class_\\AddArrayDefaultToArrayPropertyRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Closure\\StaticClosureRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/Closure/StaticClosureRector.php',
|
||||
'Rector\\CodingStyle\\Rector\\Encapsed\\EncapsedStringsToSprintfRector' => __DIR__ . '/../..' . '/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php',
|
||||
@ -2601,9 +2599,9 @@ class ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0adf00c77ea825bd3f6f8ff7362440ee::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita953e68ac0ba27e05eae6658fac73f10::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita953e68ac0ba27e05eae6658fac73f10::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita953e68ac0ba27e05eae6658fac73f10::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user