mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 904a5a7a1c8dd041524cb51ec3a689ad4cbef436
904a5a7a1c
Make use of ClassMethodReturnVendorLockResolver (#377)
This commit is contained in:
parent
cbf7ddb1e7
commit
bb3e86de23
@ -10,20 +10,14 @@ use PHPStan\Reflection\FunctionVariantWithPhpDocs;
|
||||
use PHPStan\Type\MixedType;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer;
|
||||
final class ClassMethodReturnVendorLockResolver
|
||||
{
|
||||
/**
|
||||
* @var \Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer
|
||||
*/
|
||||
private $methodReflectionContractAnalyzer;
|
||||
/**
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
public function __construct(\Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer $methodReflectionContractAnalyzer, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver)
|
||||
public function __construct(\Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver)
|
||||
{
|
||||
$this->methodReflectionContractAnalyzer = $methodReflectionContractAnalyzer;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
public function isVendorLocked(\PhpParser\Node\Stmt\ClassMethod $classMethod) : bool
|
||||
@ -36,27 +30,24 @@ final class ClassMethodReturnVendorLockResolver
|
||||
if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
if (\count($classReflection->getAncestors()) === 1) {
|
||||
return \false;
|
||||
}
|
||||
$methodName = $this->nodeNameResolver->getName($classMethod);
|
||||
if ($this->isVendorLockedByParentClass($classReflection, $methodName)) {
|
||||
if ($this->isVendorLockedByAncestors($classReflection, $methodName)) {
|
||||
return \true;
|
||||
}
|
||||
if ($classReflection->isTrait()) {
|
||||
return \false;
|
||||
}
|
||||
return $this->methodReflectionContractAnalyzer->hasInterfaceContract($classReflection, $methodName);
|
||||
return $classReflection->isTrait();
|
||||
}
|
||||
private function isVendorLockedByParentClass(\PHPStan\Reflection\ClassReflection $classReflection, string $methodName) : bool
|
||||
private function isVendorLockedByAncestors(\PHPStan\Reflection\ClassReflection $classReflection, string $methodName) : bool
|
||||
{
|
||||
foreach ($classReflection->getParents() as $parentClassReflections) {
|
||||
$nativeClassReflection = $parentClassReflections->getNativeReflection();
|
||||
foreach ($classReflection->getAncestors() as $ancestorClassReflections) {
|
||||
if ($ancestorClassReflections === $classReflection) {
|
||||
continue;
|
||||
}
|
||||
$nativeClassReflection = $ancestorClassReflections->getNativeReflection();
|
||||
// this should avoid detecting @method as real method
|
||||
if (!$nativeClassReflection->hasMethod($methodName)) {
|
||||
continue;
|
||||
}
|
||||
$parentClassMethodReflection = $parentClassReflections->getNativeMethod($methodName);
|
||||
$parentClassMethodReflection = $ancestorClassReflections->getNativeMethod($methodName);
|
||||
$parametersAcceptor = $parentClassMethodReflection->getVariants()[0];
|
||||
if (!$parametersAcceptor instanceof \PHPStan\Reflection\FunctionVariantWithPhpDocs) {
|
||||
continue;
|
||||
|
@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\VendorLocker\NodeVendorLocker;
|
||||
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\Php\PhpMethodReflection;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer;
|
||||
final class ClassMethodVendorLockResolver
|
||||
{
|
||||
/**
|
||||
* @var \Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer
|
||||
*/
|
||||
private $methodReflectionContractAnalyzer;
|
||||
/**
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
public function __construct(\Rector\VendorLocker\Reflection\MethodReflectionContractAnalyzer $methodReflectionContractAnalyzer, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver)
|
||||
{
|
||||
$this->methodReflectionContractAnalyzer = $methodReflectionContractAnalyzer;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
/**
|
||||
* Checks for:
|
||||
* - interface required methods
|
||||
* - abstract classes reqired method
|
||||
*
|
||||
* Prevent:
|
||||
* - removing class methods, that breaks the code
|
||||
*/
|
||||
public function isRemovalVendorLocked(\PhpParser\Node\Stmt\ClassMethod $classMethod) : bool
|
||||
{
|
||||
$classMethodName = $this->nodeNameResolver->getName($classMethod);
|
||||
/** @var Scope $scope */
|
||||
$scope = $classMethod->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
|
||||
$classReflection = $scope->getClassReflection();
|
||||
if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
if ($this->methodReflectionContractAnalyzer->hasInterfaceContract($classReflection, $classMethodName)) {
|
||||
return \true;
|
||||
}
|
||||
foreach ($classReflection->getParents() as $parentClassReflection) {
|
||||
if (!$parentClassReflection->hasMethod($classMethodName)) {
|
||||
continue;
|
||||
}
|
||||
$methodReflection = $parentClassReflection->getNativeMethod($classMethodName);
|
||||
if (!$methodReflection instanceof \PHPStan\Reflection\Php\PhpMethodReflection) {
|
||||
continue;
|
||||
}
|
||||
if ($methodReflection->isAbstract()) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\VendorLocker\Reflection;
|
||||
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
final class MethodReflectionContractAnalyzer
|
||||
{
|
||||
public function hasInterfaceContract(\PHPStan\Reflection\ClassReflection $classReflection, string $methodName) : bool
|
||||
{
|
||||
foreach ($classReflection->getInterfaces() as $interfaceReflection) {
|
||||
if ($interfaceReflection->hasMethod($methodName)) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
}
|
@ -56,7 +56,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param FuncCall $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
foreach ($this->replacedArguments as $replacedArgument) {
|
||||
if (!$this->isName($node->name, $replacedArgument->getFunction())) {
|
||||
|
@ -56,7 +56,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param FuncCall $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
foreach ($this->functionArgumentSwaps as $functionArgumentSwap) {
|
||||
if (!$this->isName($node, $functionArgumentSwap->getFunction())) {
|
||||
|
@ -47,7 +47,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param NotEqual $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\BinaryOp\NotEqual
|
||||
{
|
||||
// invoke override to default "!="
|
||||
$node->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NODE, null);
|
||||
|
@ -57,9 +57,9 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param ClassConst|Property $node
|
||||
* @return Node|Node[]|null
|
||||
* @return Node[]|null
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
{
|
||||
if ($node instanceof \PhpParser\Node\Stmt\ClassConst) {
|
||||
if (\count($node->consts) < 2) {
|
||||
|
@ -75,7 +75,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param ClassMethod $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\ClassMethod
|
||||
{
|
||||
foreach ($this->methodsByType as $type => $methods) {
|
||||
if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType($type))) {
|
||||
|
@ -54,7 +54,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param String_ $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Scalar\String_
|
||||
{
|
||||
$doubleQuoteCount = \substr_count($node->value, '"');
|
||||
$singleQuoteCount = \substr_count($node->value, "'");
|
||||
|
@ -61,9 +61,8 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param If_ $node
|
||||
* @return null|If_
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Stmt\If_
|
||||
{
|
||||
$scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
|
||||
// a trait
|
||||
|
@ -54,7 +54,7 @@ CODE_SAMPLE
|
||||
* @param TryCatch $node
|
||||
* @return Stmt[]|null
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
{
|
||||
if (\count($node->catches) !== 1) {
|
||||
return null;
|
||||
|
@ -49,7 +49,7 @@ CODE_SAMPLE
|
||||
* @param Return_ $node
|
||||
* @return null|Expression[]|Return_[]
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
{
|
||||
if (!$node->expr instanceof \PhpParser\Node\Expr\MethodCall) {
|
||||
return null;
|
||||
|
@ -4,6 +4,7 @@ declare (strict_types=1);
|
||||
namespace Rector\DowngradePhp53\Rector\Dir;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Scalar\MagicConst\Dir;
|
||||
use PhpParser\Node\Scalar\MagicConst\File;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
@ -48,7 +49,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Dir $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
return $this->nodeFactory->createFuncCall('dirname', [new \PhpParser\Node\Scalar\MagicConst\File()]);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Coalesce $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Ternary
|
||||
{
|
||||
$if = $node->left;
|
||||
$else = $node->right;
|
||||
|
@ -40,9 +40,9 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param GroupUse $node
|
||||
* @return Use_[]|null
|
||||
* @return Use_[]
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : array
|
||||
{
|
||||
$prefix = $this->getName($node->prefix);
|
||||
$uses = [];
|
||||
|
@ -62,7 +62,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Spaceship $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
$leftVariableParam = new \PhpParser\Node\Expr\Variable('left');
|
||||
$rightVariableParam = new \PhpParser\Node\Expr\Variable('right');
|
||||
|
@ -45,7 +45,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param ClassConst $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\ClassConst
|
||||
{
|
||||
$this->visibilityManipulator->removeVisibility($node);
|
||||
return $node;
|
||||
|
@ -5,6 +5,7 @@ namespace Rector\DowngradePhp74\Rector\ArrowFunction;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ArrowFunction;
|
||||
use PhpParser\Node\Expr\Closure;
|
||||
use PhpParser\Node\Stmt\Return_;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Php72\NodeFactory\AnonymousFunctionFactory;
|
||||
@ -61,7 +62,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param ArrowFunction $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Closure
|
||||
{
|
||||
$stmts = [new \PhpParser\Node\Stmt\Return_($node->expr)];
|
||||
return $this->anonymousFunctionFactory->create($node->params, $stmts, $node->returnType);
|
||||
|
@ -38,7 +38,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param AssignCoalesce $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Assign
|
||||
{
|
||||
return new \PhpParser\Node\Expr\Assign($node->var, new \PhpParser\Node\Expr\BinaryOp\Coalesce($node->var, $node->expr));
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param NullsafeMethodCall|NullsafePropertyFetch $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Ternary
|
||||
{
|
||||
$tempVarName = $this->variableNaming->resolveFromNodeWithScopeCountAndFallbackName($node->var, $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE), '_');
|
||||
$variable = new \PhpParser\Node\Expr\Variable($tempVarName);
|
||||
|
@ -76,9 +76,9 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param If_ $node
|
||||
* @return Stmt[]|Node|null
|
||||
* @return Stmt[]|null
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?array
|
||||
{
|
||||
$nextNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE);
|
||||
if (!$nextNode instanceof \PhpParser\Node\Stmt\Return_) {
|
||||
|
@ -44,7 +44,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param FuncCall $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
if ($this->isName($node, 'mysql_create_db')) {
|
||||
return $this->processMysqlCreateDb($node);
|
||||
|
@ -60,7 +60,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Switch_ $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\Switch_
|
||||
{
|
||||
foreach ($node->cases as $case) {
|
||||
foreach ($case->stmts as $key => $caseStmt) {
|
||||
|
@ -45,7 +45,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param FuncCall $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall
|
||||
{
|
||||
foreach ($node->args as $nodeArg) {
|
||||
if ($nodeArg->byRef) {
|
||||
|
@ -100,7 +100,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\Class_
|
||||
{
|
||||
$this->matchedObjectTypes = [];
|
||||
// collect classes with new to factory in all classes
|
||||
|
@ -51,7 +51,7 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param ClassConstFetch $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\ClassConstFetch
|
||||
{
|
||||
foreach ($this->renameClassConstFetches as $renameClassConstFetch) {
|
||||
if (!$this->isObjectType($node->class, $renameClassConstFetch->getOldObjectType())) {
|
||||
|
@ -73,9 +73,8 @@ CODE_SAMPLE
|
||||
}
|
||||
/**
|
||||
* @param MethodCall $node
|
||||
* @return Node|Node[]|null
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node)
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\MethodCall
|
||||
{
|
||||
foreach ($this->callableInMethodCallToVariable as $singleCallableInMethodCallToVariable) {
|
||||
if (!$this->isObjectType($node->var, $singleCallableInMethodCallToVariable->getObjectType())) {
|
||||
|
@ -11,6 +11,7 @@ use PhpParser\Node\Stmt\Function_;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\TypeDeclaration\TypeInferer\SilentVoidResolver;
|
||||
use Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnVendorLockResolver;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
@ -22,9 +23,14 @@ final class AddVoidReturnTypeWhereNoReturnRector extends \Rector\Core\Rector\Abs
|
||||
* @var \Rector\TypeDeclaration\TypeInferer\SilentVoidResolver
|
||||
*/
|
||||
private $silentVoidResolver;
|
||||
public function __construct(\Rector\TypeDeclaration\TypeInferer\SilentVoidResolver $silentVoidResolver)
|
||||
/**
|
||||
* @var \Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnVendorLockResolver
|
||||
*/
|
||||
private $classMethodReturnVendorLockResolver;
|
||||
public function __construct(\Rector\TypeDeclaration\TypeInferer\SilentVoidResolver $silentVoidResolver, \Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnVendorLockResolver $classMethodReturnVendorLockResolver)
|
||||
{
|
||||
$this->silentVoidResolver = $silentVoidResolver;
|
||||
$this->classMethodReturnVendorLockResolver = $classMethodReturnVendorLockResolver;
|
||||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
@ -74,6 +80,9 @@ CODE_SAMPLE
|
||||
if (!$this->silentVoidResolver->hasExclusiveVoid($node)) {
|
||||
return null;
|
||||
}
|
||||
if ($node instanceof \PhpParser\Node\Stmt\ClassMethod && $this->classMethodReturnVendorLockResolver->isVendorLocked($node)) {
|
||||
return null;
|
||||
}
|
||||
$node->returnType = new \PhpParser\Node\Identifier('void');
|
||||
return $node;
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ use PhpParser\Node\UnionType as PhpParserUnionType;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\UnionType;
|
||||
use Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
@ -69,11 +68,7 @@ final class ReturnTypeDeclarationRector extends \Rector\Core\Rector\AbstractRect
|
||||
* @var \Rector\TypeDeclaration\TypeAnalyzer\ObjectTypeComparator
|
||||
*/
|
||||
private $objectTypeComparator;
|
||||
/**
|
||||
* @var \Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer
|
||||
*/
|
||||
private $externalFullyQualifiedAnalyzer;
|
||||
public function __construct(\Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer $returnTypeInferer, \Rector\TypeDeclaration\ChildPopulator\ChildReturnPopulator $childReturnPopulator, \Rector\TypeDeclaration\TypeAlreadyAddedChecker\ReturnTypeAlreadyAddedChecker $returnTypeAlreadyAddedChecker, \Rector\TypeDeclaration\PhpDocParser\NonInformativeReturnTagRemover $nonInformativeReturnTagRemover, \Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnTypeOverrideGuard $classMethodReturnTypeOverrideGuard, \Rector\VendorLocker\VendorLockResolver $vendorLockResolver, \Rector\TypeDeclaration\PhpParserTypeAnalyzer $phpParserTypeAnalyzer, \Rector\TypeDeclaration\TypeAnalyzer\ObjectTypeComparator $objectTypeComparator, \Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer $externalFullyQualifiedAnalyzer)
|
||||
public function __construct(\Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer $returnTypeInferer, \Rector\TypeDeclaration\ChildPopulator\ChildReturnPopulator $childReturnPopulator, \Rector\TypeDeclaration\TypeAlreadyAddedChecker\ReturnTypeAlreadyAddedChecker $returnTypeAlreadyAddedChecker, \Rector\TypeDeclaration\PhpDocParser\NonInformativeReturnTagRemover $nonInformativeReturnTagRemover, \Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnTypeOverrideGuard $classMethodReturnTypeOverrideGuard, \Rector\VendorLocker\VendorLockResolver $vendorLockResolver, \Rector\TypeDeclaration\PhpParserTypeAnalyzer $phpParserTypeAnalyzer, \Rector\TypeDeclaration\TypeAnalyzer\ObjectTypeComparator $objectTypeComparator)
|
||||
{
|
||||
$this->returnTypeInferer = $returnTypeInferer;
|
||||
$this->childReturnPopulator = $childReturnPopulator;
|
||||
@ -83,7 +78,6 @@ final class ReturnTypeDeclarationRector extends \Rector\Core\Rector\AbstractRect
|
||||
$this->vendorLockResolver = $vendorLockResolver;
|
||||
$this->phpParserTypeAnalyzer = $phpParserTypeAnalyzer;
|
||||
$this->objectTypeComparator = $objectTypeComparator;
|
||||
$this->externalFullyQualifiedAnalyzer = $externalFullyQualifiedAnalyzer;
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
@ -204,9 +198,6 @@ CODE_SAMPLE
|
||||
*/
|
||||
private function addReturnType($functionLike, $inferredReturnNode) : void
|
||||
{
|
||||
if ($this->isExternalVoid($functionLike, $inferredReturnNode)) {
|
||||
return;
|
||||
}
|
||||
if ($functionLike->returnType === null) {
|
||||
$functionLike->returnType = $inferredReturnNode;
|
||||
return;
|
||||
@ -221,21 +212,6 @@ CODE_SAMPLE
|
||||
$functionLike->returnType = $inferredReturnNode;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $functionLike
|
||||
* @param \PhpParser\Node\Name|\PhpParser\Node\NullableType|PhpParserUnionType $inferredReturnNode
|
||||
*/
|
||||
private function isExternalVoid($functionLike, $inferredReturnNode) : bool
|
||||
{
|
||||
$classLike = $functionLike->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE);
|
||||
if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) {
|
||||
return \false;
|
||||
}
|
||||
if (!$this->externalFullyQualifiedAnalyzer->hasVendorLocatedDependency($classLike)) {
|
||||
return \false;
|
||||
}
|
||||
return $functionLike->returnType === null && $this->isName($inferredReturnNode, 'void');
|
||||
}
|
||||
private function isNullableTypeSubType(\PHPStan\Type\Type $currentType, \PHPStan\Type\Type $inferedType) : bool
|
||||
{
|
||||
if (!$currentType instanceof \PHPStan\Type\UnionType) {
|
||||
|
@ -6,7 +6,6 @@ namespace Rector\TypeDeclaration\TypeInferer;
|
||||
use PhpParser\Node\Expr\Closure;
|
||||
use PhpParser\Node\Expr\Yield_;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Expression;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
@ -16,7 +15,6 @@ use PhpParser\Node\Stmt\Switch_;
|
||||
use PhpParser\Node\Stmt\Throw_;
|
||||
use PhpParser\Node\Stmt\Trait_;
|
||||
use PhpParser\Node\Stmt\TryCatch;
|
||||
use Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer;
|
||||
use Rector\Core\PhpParser\Node\BetterNodeFinder;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
final class SilentVoidResolver
|
||||
@ -25,14 +23,9 @@ final class SilentVoidResolver
|
||||
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
|
||||
*/
|
||||
private $betterNodeFinder;
|
||||
/**
|
||||
* @var \Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer
|
||||
*/
|
||||
private $externalFullyQualifiedAnalyzer;
|
||||
public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \Rector\Core\NodeAnalyzer\ExternalFullyQualifiedAnalyzer $externalFullyQualifiedAnalyzer)
|
||||
public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder)
|
||||
{
|
||||
$this->betterNodeFinder = $betterNodeFinder;
|
||||
$this->externalFullyQualifiedAnalyzer = $externalFullyQualifiedAnalyzer;
|
||||
}
|
||||
/**
|
||||
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Expr\Closure|\PhpParser\Node\Stmt\Function_ $functionLike
|
||||
@ -52,9 +45,6 @@ final class SilentVoidResolver
|
||||
if ($this->betterNodeFinder->hasInstancesOf((array) $functionLike->stmts, [\PhpParser\Node\Expr\Yield_::class])) {
|
||||
return \false;
|
||||
}
|
||||
if ($classLike instanceof \PhpParser\Node\Stmt\Class_ && $this->externalFullyQualifiedAnalyzer->hasVendorLocatedDependency($classLike)) {
|
||||
return \false;
|
||||
}
|
||||
/** @var Return_[] $returns */
|
||||
$returns = $this->betterNodeFinder->findInstanceOf((array) $functionLike->stmts, \PhpParser\Node\Stmt\Return_::class);
|
||||
foreach ($returns as $return) {
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a9b1bbba885aa28167e65e5a46063959cf6449a3';
|
||||
public const PACKAGE_VERSION = '904a5a7a1c8dd041524cb51ec3a689ad4cbef436';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-07-04 18:11:13';
|
||||
public const RELEASE_DATE = '2021-07-04 23:04:09';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210704\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
@ -22,14 +22,14 @@ final class ConfigurableCallValuesCollectingPhpFileLoader extends \RectorPrefix2
|
||||
/**
|
||||
* @param mixed $resource
|
||||
*/
|
||||
public function load($resource, string $type = null)
|
||||
public function load($resource, string $type = null) : void
|
||||
{
|
||||
// this call collects root values
|
||||
$this->collectConfigureCallsFromJustImportedConfigurableRectorDefinitions();
|
||||
parent::load($resource, $type);
|
||||
$this->collectConfigureCallsFromJustImportedConfigurableRectorDefinitions();
|
||||
}
|
||||
public function import($resource, string $type = null, $ignoreErrors = \false, $sourceResource = null, $exclude = null)
|
||||
public function import($resource, string $type = null, $ignoreErrors = \false, $sourceResource = null, $exclude = null) : void
|
||||
{
|
||||
// this call collects root values
|
||||
$this->collectConfigureCallsFromJustImportedConfigurableRectorDefinitions();
|
||||
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Core\NodeAnalyzer;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
final class ExternalFullyQualifiedAnalyzer
|
||||
{
|
||||
/**
|
||||
* Is in a class that depends on a class, interface or trait located in vendor?
|
||||
*/
|
||||
public function hasVendorLocatedDependency(\PhpParser\Node $node) : bool
|
||||
{
|
||||
$scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
|
||||
if (!$scope instanceof \PHPStan\Analyser\Scope) {
|
||||
return \false;
|
||||
}
|
||||
$classReflection = $scope->getClassReflection();
|
||||
if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
foreach ($classReflection->getAncestors() as $ancestorClassReflection) {
|
||||
if ($classReflection === $ancestorClassReflection) {
|
||||
continue;
|
||||
}
|
||||
$fileName = $ancestorClassReflection->getFileName();
|
||||
if ($fileName === \false) {
|
||||
continue;
|
||||
}
|
||||
// file is located in vendor → out of modifiable scope
|
||||
if (\strpos($fileName, '/vendor/') !== \false) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
}
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1::getLoader();
|
||||
return ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2::getLoader();
|
||||
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -1837,7 +1837,6 @@ return array(
|
||||
'Rector\\Core\\NodeAnalyzer\\ClassAnalyzer' => $baseDir . '/src/NodeAnalyzer/ClassAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\CompactFuncCallAnalyzer' => $baseDir . '/src/NodeAnalyzer/CompactFuncCallAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ConstFetchAnalyzer' => $baseDir . '/src/NodeAnalyzer/ConstFetchAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ExternalFullyQualifiedAnalyzer' => $baseDir . '/src/NodeAnalyzer/ExternalFullyQualifiedAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ParamAnalyzer' => $baseDir . '/src/NodeAnalyzer/ParamAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\PromotedPropertyParamCleaner' => $baseDir . '/src/NodeAnalyzer/PromotedPropertyParamCleaner.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\PropertyFetchAnalyzer' => $baseDir . '/src/NodeAnalyzer/PropertyFetchAnalyzer.php',
|
||||
@ -3192,10 +3191,8 @@ return array(
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodParamVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/ClassMethodParamVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodReturnTypeOverrideGuard' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/ClassMethodReturnTypeOverrideGuard.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodReturnVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/ClassMethodReturnVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/ClassMethodVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\PropertyTypeVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/PropertyTypeVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\PropertyVisibilityVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/PropertyVisibilityVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\Reflection\\MethodReflectionContractAnalyzer' => $baseDir . '/packages/VendorLocker/Reflection/MethodReflectionContractAnalyzer.php',
|
||||
'Rector\\VendorLocker\\VendorLockResolver' => $baseDir . '/packages/VendorLocker/VendorLockResolver.php',
|
||||
'Rector\\Visibility\\Rector\\ClassConst\\ChangeConstantVisibilityRector' => $baseDir . '/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php',
|
||||
'Rector\\Visibility\\Rector\\ClassMethod\\ChangeMethodVisibilityRector' => $baseDir . '/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php',
|
||||
|
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 ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
class ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', '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\ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequirefbed5e30872de338ac03dddfdc4d41a1($fileIdentifier, $file);
|
||||
composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequirefbed5e30872de338ac03dddfdc4d41a1($fileIdentifier, $file)
|
||||
function composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
11
vendor/composer/autoload_static.php
vendored
11
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
class ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -2192,7 +2192,6 @@ class ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
'Rector\\Core\\NodeAnalyzer\\ClassAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ClassAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\CompactFuncCallAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/CompactFuncCallAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ConstFetchAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ConstFetchAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ExternalFullyQualifiedAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ExternalFullyQualifiedAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\ParamAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/ParamAnalyzer.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\PromotedPropertyParamCleaner' => __DIR__ . '/../..' . '/src/NodeAnalyzer/PromotedPropertyParamCleaner.php',
|
||||
'Rector\\Core\\NodeAnalyzer\\PropertyFetchAnalyzer' => __DIR__ . '/../..' . '/src/NodeAnalyzer/PropertyFetchAnalyzer.php',
|
||||
@ -3547,10 +3546,8 @@ class ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodParamVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/ClassMethodParamVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodReturnTypeOverrideGuard' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/ClassMethodReturnTypeOverrideGuard.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodReturnVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/ClassMethodReturnVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/ClassMethodVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\PropertyTypeVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/PropertyTypeVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\NodeVendorLocker\\PropertyVisibilityVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/PropertyVisibilityVendorLockResolver.php',
|
||||
'Rector\\VendorLocker\\Reflection\\MethodReflectionContractAnalyzer' => __DIR__ . '/../..' . '/packages/VendorLocker/Reflection/MethodReflectionContractAnalyzer.php',
|
||||
'Rector\\VendorLocker\\VendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/VendorLockResolver.php',
|
||||
'Rector\\Visibility\\Rector\\ClassConst\\ChangeConstantVisibilityRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php',
|
||||
'Rector\\Visibility\\Rector\\ClassMethod\\ChangeMethodVisibilityRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php',
|
||||
@ -3848,9 +3845,9 @@ class ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitfbed5e30872de338ac03dddfdc4d41a1::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$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('RectorPrefix20210704\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1', false) && !interface_exists('ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1', false) && !trait_exists('ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\ComposerAutoloaderInitfbed5e30872de338ac03dddfdc4d41a1');
|
||||
if (!class_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false) && !interface_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false) && !trait_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\Doctrine\Inflector\Inflector');
|
||||
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210704\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequirefbed5e30872de338ac03dddfdc4d41a1')) {
|
||||
function composerRequirefbed5e30872de338ac03dddfdc4d41a1() {
|
||||
return \RectorPrefix20210704\composerRequirefbed5e30872de338ac03dddfdc4d41a1(...func_get_args());
|
||||
if (!function_exists('composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2')) {
|
||||
function composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2() {
|
||||
return \RectorPrefix20210704\composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user