mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-30 07:50:53 +00:00
Updated Rector to commit 4c507636dc
4c507636dc
Skip too wide union types on AddMethodCallBasedStrictParamTypeRector (#1097)
This commit is contained in:
parent
59c1ff9298
commit
3203dd5529
|
@ -1,4 +1,4 @@
|
|||
# 485 Rules Overview
|
||||
# 476 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
|||
|
||||
- [DeadCode](#deadcode) (49)
|
||||
|
||||
- [Defluent](#defluent) (9)
|
||||
|
||||
- [DependencyInjection](#dependencyinjection) (3)
|
||||
|
||||
- [DowngradePhp53](#downgradephp53) (1)
|
||||
|
@ -58,7 +56,7 @@
|
|||
|
||||
- [Php52](#php52) (2)
|
||||
|
||||
- [Php53](#php53) (4)
|
||||
- [Php53](#php53) (3)
|
||||
|
||||
- [Php54](#php54) (2)
|
||||
|
||||
|
@ -76,7 +74,7 @@
|
|||
|
||||
- [Php74](#php74) (15)
|
||||
|
||||
- [Php80](#php80) (16)
|
||||
- [Php80](#php80) (17)
|
||||
|
||||
- [Php81](#php81) (5)
|
||||
|
||||
|
@ -3949,202 +3947,6 @@ Remove php version checks if they are passed
|
|||
|
||||
<br>
|
||||
|
||||
## Defluent
|
||||
|
||||
### DefluentReturnMethodCallRector
|
||||
|
||||
Turns return of fluent, to standalone call line and return of value
|
||||
|
||||
- class: [`Rector\Defluent\Rector\Return_\DefluentReturnMethodCallRector`](../rules/Defluent/Rector/Return_/DefluentReturnMethodCallRector.php)
|
||||
|
||||
```diff
|
||||
$someClass = new SomeClass();
|
||||
-return $someClass->someFunction();
|
||||
+$someClass->someFunction();
|
||||
+return $someClass;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### FluentChainMethodCallToNormalMethodCallRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector`](../rules/Defluent/Rector/MethodCall/FluentChainMethodCallToNormalMethodCallRector.php)
|
||||
|
||||
```diff
|
||||
$someClass = new SomeClass();
|
||||
-$someClass->someFunction()
|
||||
- ->otherFunction();
|
||||
+$someClass->someFunction();
|
||||
+$someClass->otherFunction();
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### InArgFluentChainMethodCallToStandaloneMethodCallRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\MethodCall\InArgFluentChainMethodCallToStandaloneMethodCallRector`](../rules/Defluent/Rector/MethodCall/InArgFluentChainMethodCallToStandaloneMethodCallRector.php)
|
||||
|
||||
```diff
|
||||
class UsedAsParameter
|
||||
{
|
||||
public function someFunction(FluentClass $someClass)
|
||||
{
|
||||
- $this->processFluentClass($someClass->someFunction()->otherFunction());
|
||||
+ $someClass->someFunction();
|
||||
+ $someClass->otherFunction();
|
||||
+ $this->processFluentClass($someClass);
|
||||
}
|
||||
|
||||
public function processFluentClass(FluentClass $someClass)
|
||||
{
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### MethodCallOnSetterMethodCallToStandaloneAssignRector
|
||||
|
||||
Change method call on setter to standalone assign before the setter
|
||||
|
||||
- class: [`Rector\Defluent\Rector\MethodCall\MethodCallOnSetterMethodCallToStandaloneAssignRector`](../rules/Defluent/Rector/MethodCall/MethodCallOnSetterMethodCallToStandaloneAssignRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function some()
|
||||
{
|
||||
- $this->anotherMethod(new AnotherClass())
|
||||
- ->someFunction();
|
||||
+ $anotherClass = new AnotherClass();
|
||||
+ $anotherClass->someFunction();
|
||||
+ $this->anotherMethod($anotherClass);
|
||||
}
|
||||
|
||||
public function anotherMethod(AnotherClass $anotherClass)
|
||||
{
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### NewFluentChainMethodCallToNonFluentRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\MethodCall\NewFluentChainMethodCallToNonFluentRector`](../rules/Defluent/Rector/MethodCall/NewFluentChainMethodCallToNonFluentRector.php)
|
||||
|
||||
```diff
|
||||
-(new SomeClass())->someFunction()
|
||||
- ->otherFunction();
|
||||
+$someClass = new SomeClass();
|
||||
+$someClass->someFunction();
|
||||
+$someClass->otherFunction();
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### NormalToFluentRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Defluent\Rector\ClassMethod\NormalToFluentRector`](../rules/Defluent/Rector/ClassMethod/NormalToFluentRector.php)
|
||||
|
||||
```php
|
||||
use Rector\Defluent\Rector\ClassMethod\NormalToFluentRector;
|
||||
use Rector\Defluent\ValueObject\NormalToFluent;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(NormalToFluentRector::class)
|
||||
->call('configure', [[
|
||||
NormalToFluentRector::CALLS_TO_FLUENT => ValueObjectInliner::inline([
|
||||
new NormalToFluent('SomeClass', ['someFunction', 'otherFunction']), ]
|
||||
),
|
||||
]]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
$someObject = new SomeClass();
|
||||
-$someObject->someFunction();
|
||||
-$someObject->otherFunction();
|
||||
+$someObject->someFunction()
|
||||
+ ->otherFunction();
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnFluentChainMethodCallToNormalMethodCallRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\Return_\ReturnFluentChainMethodCallToNormalMethodCallRector`](../rules/Defluent/Rector/Return_/ReturnFluentChainMethodCallToNormalMethodCallRector.php)
|
||||
|
||||
```diff
|
||||
$someClass = new SomeClass();
|
||||
+$someClass->someFunction();
|
||||
+$someClass->otherFunction();
|
||||
|
||||
-return $someClass->someFunction()
|
||||
- ->otherFunction();
|
||||
+return $someClass;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnNewFluentChainMethodCallToNonFluentRector
|
||||
|
||||
Turns fluent interface calls to classic ones.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\Return_\ReturnNewFluentChainMethodCallToNonFluentRector`](../rules/Defluent/Rector/Return_/ReturnNewFluentChainMethodCallToNonFluentRector.php)
|
||||
|
||||
```diff
|
||||
-return (new SomeClass())->someFunction()
|
||||
- ->otherFunction();
|
||||
+$someClass = new SomeClass();
|
||||
+$someClass->someFunction();
|
||||
+$someClass->otherFunction();
|
||||
+return $someClass;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnThisRemoveRector
|
||||
|
||||
Removes "return `$this;"` from *fluent interfaces* for specified classes.
|
||||
|
||||
- class: [`Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector`](../rules/Defluent/Rector/ClassMethod/ReturnThisRemoveRector.php)
|
||||
|
||||
```diff
|
||||
class SomeExampleClass
|
||||
{
|
||||
public function someFunction()
|
||||
{
|
||||
- return $this;
|
||||
}
|
||||
|
||||
public function otherFunction()
|
||||
{
|
||||
- return $this;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## DependencyInjection
|
||||
|
||||
### ActionInjectionToConstructorInjectionRector
|
||||
|
@ -6367,19 +6169,6 @@ Change property modifier from `var` to `public`
|
|||
|
||||
## Php53
|
||||
|
||||
### ClearReturnNewByReferenceRector
|
||||
|
||||
Remove reference from "$assign = &new Value;"
|
||||
|
||||
- class: [`Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector`](../rules/Php53/Rector/AssignRef/ClearReturnNewByReferenceRector.php)
|
||||
|
||||
```diff
|
||||
-$assign = &new Value;
|
||||
+$assign = new Value;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### DirNameFileConstantToDirConstantRector
|
||||
|
||||
Convert dirname(__FILE__) to __DIR__
|
||||
|
@ -7973,6 +7762,26 @@ Move required parameters after optional ones
|
|||
|
||||
<br>
|
||||
|
||||
### Php8ResourceReturnToObjectRector
|
||||
|
||||
Change `is_resource()` to instanceof Object
|
||||
|
||||
- class: [`Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector`](../rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$ch = curl_init();
|
||||
- is_resource($ch);
|
||||
+ $ch instanceof \CurlHandle;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### RemoveUnusedVariableInCatchRector
|
||||
|
||||
Remove unused variable in `catch()`
|
||||
|
@ -11560,29 +11369,21 @@ Add known return type to functions
|
|||
|
||||
### AddMethodCallBasedStrictParamTypeRector
|
||||
|
||||
Change param type to strict type of passed expression
|
||||
Change private method param type to strict type, based on passed strict types
|
||||
|
||||
- class: [`Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector`](../rules/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
final class SomeClass
|
||||
{
|
||||
- public function getById($id)
|
||||
+ public function getById(int $id)
|
||||
public function run(int $value)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class CallerClass
|
||||
{
|
||||
public function run(SomeClass $someClass)
|
||||
{
|
||||
$someClass->getById($this->getId());
|
||||
$this->resolve($value);
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
- private function resolve($value)
|
||||
+ private function resolve(int $value)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -39,7 +39,7 @@ final class ThisCallOnStaticMethodToStaticCallRector extends \Rector\Core\Rector
|
|||
}
|
||||
public function provideMinPhpVersion() : int
|
||||
{
|
||||
return \Rector\Core\ValueObject\PhpVersionFeature::STATIC_CALL;
|
||||
return \Rector\Core\ValueObject\PhpVersionFeature::STATIC_CALL_ON_NON_STATIC;
|
||||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
|
|
|
@ -9,7 +9,11 @@ use PHPStan\Type\CallableType;
|
|||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\UnionType;
|
||||
use Rector\Core\Php\PhpVersionProvider;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
use Rector\PHPStanStaticTypeMapper\TypeAnalyzer\UnionTypeCommonTypeNarrower;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use Rector\VendorLocker\NodeVendorLocker\ClassMethodParamVendorLockResolver;
|
||||
final class ClassMethodParamTypeCompleter
|
||||
|
@ -22,19 +26,29 @@ final class ClassMethodParamTypeCompleter
|
|||
* @var \Rector\VendorLocker\NodeVendorLocker\ClassMethodParamVendorLockResolver
|
||||
*/
|
||||
private $classMethodParamVendorLockResolver;
|
||||
public function __construct(\Rector\StaticTypeMapper\StaticTypeMapper $staticTypeMapper, \Rector\VendorLocker\NodeVendorLocker\ClassMethodParamVendorLockResolver $classMethodParamVendorLockResolver)
|
||||
/**
|
||||
* @var \Rector\PHPStanStaticTypeMapper\TypeAnalyzer\UnionTypeCommonTypeNarrower
|
||||
*/
|
||||
private $unionTypeCommonTypeNarrower;
|
||||
/**
|
||||
* @var \Rector\Core\Php\PhpVersionProvider
|
||||
*/
|
||||
private $phpVersionProvider;
|
||||
public function __construct(\Rector\StaticTypeMapper\StaticTypeMapper $staticTypeMapper, \Rector\VendorLocker\NodeVendorLocker\ClassMethodParamVendorLockResolver $classMethodParamVendorLockResolver, \Rector\PHPStanStaticTypeMapper\TypeAnalyzer\UnionTypeCommonTypeNarrower $unionTypeCommonTypeNarrower, \Rector\Core\Php\PhpVersionProvider $phpVersionProvider)
|
||||
{
|
||||
$this->staticTypeMapper = $staticTypeMapper;
|
||||
$this->classMethodParamVendorLockResolver = $classMethodParamVendorLockResolver;
|
||||
$this->unionTypeCommonTypeNarrower = $unionTypeCommonTypeNarrower;
|
||||
$this->phpVersionProvider = $phpVersionProvider;
|
||||
}
|
||||
/**
|
||||
* @param array<int, Type> $classParameterTypes
|
||||
*/
|
||||
public function complete(\PhpParser\Node\Stmt\ClassMethod $classMethod, array $classParameterTypes) : ?\PhpParser\Node\Stmt\ClassMethod
|
||||
public function complete(\PhpParser\Node\Stmt\ClassMethod $classMethod, array $classParameterTypes, int $maxUnionTypes) : ?\PhpParser\Node\Stmt\ClassMethod
|
||||
{
|
||||
$hasChanged = \false;
|
||||
foreach ($classParameterTypes as $position => $argumentStaticType) {
|
||||
if ($this->shouldSkipArgumentStaticType($classMethod, $argumentStaticType, $position)) {
|
||||
if ($this->shouldSkipArgumentStaticType($classMethod, $argumentStaticType, $position, $maxUnionTypes)) {
|
||||
continue;
|
||||
}
|
||||
$phpParserTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($argumentStaticType, \Rector\PHPStanStaticTypeMapper\Enum\TypeKind::PARAM());
|
||||
|
@ -50,7 +64,7 @@ final class ClassMethodParamTypeCompleter
|
|||
}
|
||||
return null;
|
||||
}
|
||||
private function shouldSkipArgumentStaticType(\PhpParser\Node\Stmt\ClassMethod $classMethod, \PHPStan\Type\Type $argumentStaticType, int $position) : bool
|
||||
private function shouldSkipArgumentStaticType(\PhpParser\Node\Stmt\ClassMethod $classMethod, \PHPStan\Type\Type $argumentStaticType, int $position, int $maxUnionTypes) : bool
|
||||
{
|
||||
if ($argumentStaticType instanceof \PHPStan\Type\MixedType) {
|
||||
return \true;
|
||||
|
@ -69,11 +83,14 @@ final class ClassMethodParamTypeCompleter
|
|||
if ($this->isClosureAndCallableType($currentParameterStaticType, $argumentStaticType)) {
|
||||
return \true;
|
||||
}
|
||||
// avoid overriding more precise type
|
||||
if ($argumentStaticType->isSuperTypeOf($currentParameterStaticType)->yes()) {
|
||||
// narrow union type in case its not supported yet
|
||||
$argumentStaticType = $this->narrowUnionTypeIfNotSupported($argumentStaticType);
|
||||
// too many union types
|
||||
if ($this->isTooDetailedUnionType($currentParameterStaticType, $argumentStaticType, $maxUnionTypes)) {
|
||||
return \true;
|
||||
}
|
||||
if ($currentParameterStaticType->equals($argumentStaticType)) {
|
||||
// avoid overriding more precise type
|
||||
if ($argumentStaticType->isSuperTypeOf($currentParameterStaticType)->yes()) {
|
||||
return \true;
|
||||
}
|
||||
// already completed → skip
|
||||
|
@ -93,4 +110,29 @@ final class ClassMethodParamTypeCompleter
|
|||
}
|
||||
return $type->getClassName() === 'Closure';
|
||||
}
|
||||
private function isTooDetailedUnionType(\PHPStan\Type\Type $currentType, \PHPStan\Type\Type $newType, int $maxUnionTypes) : bool
|
||||
{
|
||||
if ($currentType instanceof \PHPStan\Type\MixedType) {
|
||||
return \false;
|
||||
}
|
||||
if (!$newType instanceof \PHPStan\Type\UnionType) {
|
||||
return \false;
|
||||
}
|
||||
return \count($newType->getTypes()) > $maxUnionTypes;
|
||||
}
|
||||
private function narrowUnionTypeIfNotSupported(\PHPStan\Type\Type $type) : \PHPStan\Type\Type
|
||||
{
|
||||
if (!$type instanceof \PHPStan\Type\UnionType) {
|
||||
return $type;
|
||||
}
|
||||
// union is supported, so it's ok
|
||||
if ($this->phpVersionProvider->isAtLeastPhpVersion(\Rector\Core\ValueObject\PhpVersionFeature::UNION_TYPES)) {
|
||||
return $type;
|
||||
}
|
||||
$narrowedObjectType = $this->unionTypeCommonTypeNarrower->narrowToSharedObjectType($type);
|
||||
if ($narrowedObjectType instanceof \PHPStan\Type\ObjectType) {
|
||||
return $narrowedObjectType;
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
*/
|
||||
final class AddMethodCallBasedStrictParamTypeRector extends \Rector\Core\Rector\AbstractRector
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private const MAX_UNION_TYPES = 3;
|
||||
/**
|
||||
* @var \Rector\TypeDeclaration\NodeAnalyzer\CallTypesResolver
|
||||
*/
|
||||
|
@ -38,45 +42,29 @@ final class AddMethodCallBasedStrictParamTypeRector extends \Rector\Core\Rector\
|
|||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Change param type to strict type of passed expression', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Change private method param type to strict type, based on passed strict types', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
|
||||
final class SomeClass
|
||||
{
|
||||
public function getById($id)
|
||||
public function run(int $value)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class CallerClass
|
||||
{
|
||||
public function run(SomeClass $someClass)
|
||||
{
|
||||
$someClass->getById($this->getId());
|
||||
$this->resolve($value);
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
private function resolve($value)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
final class SomeClass
|
||||
{
|
||||
public function getById(int $id)
|
||||
public function run(int $value)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class CallerClass
|
||||
{
|
||||
public function run(SomeClass $someClass)
|
||||
{
|
||||
$someClass->getById($this->getId());
|
||||
$this->resolve($value);
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
private function resolve(int $value)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
|
@ -102,6 +90,6 @@ CODE_SAMPLE
|
|||
}
|
||||
$methodCalls = $this->localMethodCallFinder->match($node);
|
||||
$classMethodParameterTypes = $this->callTypesResolver->resolveStrictTypesFromCalls($methodCalls);
|
||||
return $this->classMethodParamTypeCompleter->complete($node, $classMethodParameterTypes);
|
||||
return $this->classMethodParamTypeCompleter->complete($node, $classMethodParameterTypes, self::MAX_UNION_TYPES);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a5f8d529a9817fc17f9241cca0cbf8e98aa3750e';
|
||||
public const PACKAGE_VERSION = '4c507636dc0be6edd08cbe587c51eca231436d8a';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-10-28 20:35:55';
|
||||
public const RELEASE_DATE = '2021-10-28 22:04:55';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20211028\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
|
@ -122,9 +122,12 @@ final class PhpVersionFeature
|
|||
*/
|
||||
public const NO_EMPTY_LIST = \Rector\Core\ValueObject\PhpVersion::PHP_70;
|
||||
/**
|
||||
* @see https://php.watch/versions/8.0/non-static-static-call-fatal-error
|
||||
* Deprecated since PHP 7.0
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public const STATIC_CALL = \Rector\Core\ValueObject\PhpVersion::PHP_70;
|
||||
public const STATIC_CALL_ON_NON_STATIC = \Rector\Core\ValueObject\PhpVersion::PHP_70;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6::getLoader();
|
||||
return ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573::getLoader();
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6
|
||||
class ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573', '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\ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita5542df2f1adc5a651809d3f60b72573::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,19 +42,19 @@ class ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInita5542df2f1adc5a651809d3f60b72573::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree31f6035c4bf6cab72e3f10b89f305b6($fileIdentifier, $file);
|
||||
composerRequirea5542df2f1adc5a651809d3f60b72573($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequiree31f6035c4bf6cab72e3f10b89f305b6($fileIdentifier, $file)
|
||||
function composerRequirea5542df2f1adc5a651809d3f60b72573($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6
|
||||
class ComposerStaticInita5542df2f1adc5a651809d3f60b72573
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
|
@ -3893,9 +3893,9 @@ class ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite31f6035c4bf6cab72e3f10b89f305b6::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita5542df2f1adc5a651809d3f60b72573::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita5542df2f1adc5a651809d3f60b72573::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita5542df2f1adc5a651809d3f60b72573::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -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('RectorPrefix20211028\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6', false) && !interface_exists('ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6', false) && !trait_exists('ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6', false)) {
|
||||
spl_autoload_call('RectorPrefix20211028\ComposerAutoloaderInite31f6035c4bf6cab72e3f10b89f305b6');
|
||||
if (!class_exists('ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573', false) && !interface_exists('ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573', false) && !trait_exists('ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573', false)) {
|
||||
spl_autoload_call('RectorPrefix20211028\ComposerAutoloaderInita5542df2f1adc5a651809d3f60b72573');
|
||||
}
|
||||
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('RectorPrefix20211028\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20211028\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiree31f6035c4bf6cab72e3f10b89f305b6')) {
|
||||
function composerRequiree31f6035c4bf6cab72e3f10b89f305b6() {
|
||||
return \RectorPrefix20211028\composerRequiree31f6035c4bf6cab72e3f10b89f305b6(...func_get_args());
|
||||
if (!function_exists('composerRequirea5542df2f1adc5a651809d3f60b72573')) {
|
||||
function composerRequirea5542df2f1adc5a651809d3f60b72573() {
|
||||
return \RectorPrefix20211028\composerRequirea5542df2f1adc5a651809d3f60b72573(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user