mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 07:52:01 +02:00
Updated Rector to commit a8ae2d8c2a92536f95a70dc99eaebb01168c4a6f
a8ae2d8c2a
implemented TypedPropertyFromStrictConstructorReadonlyClassRector (#4552)
This commit is contained in:
parent
f8344bbd9a
commit
1191015c78
@ -36,10 +36,11 @@ use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
|
||||
use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector;
|
||||
use Rector\TypeDeclaration\Rector\Param\ParamTypeFromStrictTypedPropertyRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorReadonlyClassRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodReturnTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rules([AddClosureReturnTypeRector::class, AddArrowFunctionReturnTypeRector::class, ParamTypeByMethodCallTypeRector::class, TypedPropertyFromAssignsRector::class, ReturnAnnotationIncorrectNullableRector::class, VarAnnotationIncorrectNullableRector::class, ParamAnnotationIncorrectNullableRector::class, AddReturnTypeDeclarationBasedOnParentClassMethodRector::class, ReturnTypeFromStrictTypedPropertyRector::class, TypedPropertyFromStrictConstructorRector::class, ParamTypeFromStrictTypedPropertyRector::class, AddVoidReturnTypeWhereNoReturnRector::class, ReturnTypeFromReturnNewRector::class, TypedPropertyFromStrictGetterMethodReturnTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, ReturnTypeFromStrictParamRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class, AddParamTypeSplFixedArrayRector::class, AddParamTypeBasedOnPHPUnitDataProviderRector::class, AddParamTypeFromPropertyTypeRector::class, AddReturnTypeDeclarationFromYieldsRector::class, ReturnTypeFromReturnDirectArrayRector::class, ReturnTypeFromStrictConstantReturnRector::class, ReturnTypeFromStrictTypedCallRector::class, ReturnNeverTypeRector::class, EmptyOnNullableObjectToInstanceOfRector::class, PropertyTypeFromStrictSetterGetterRector::class, ReturnTypeFromStrictTernaryRector::class, BoolReturnTypeFromStrictScalarReturnsRector::class, NumericReturnTypeFromStrictScalarReturnsRector::class, StrictArrayParamDimFetchRector::class]);
|
||||
$rectorConfig->rules([AddClosureReturnTypeRector::class, AddArrowFunctionReturnTypeRector::class, ParamTypeByMethodCallTypeRector::class, TypedPropertyFromAssignsRector::class, ReturnAnnotationIncorrectNullableRector::class, VarAnnotationIncorrectNullableRector::class, ParamAnnotationIncorrectNullableRector::class, AddReturnTypeDeclarationBasedOnParentClassMethodRector::class, ReturnTypeFromStrictTypedPropertyRector::class, TypedPropertyFromStrictConstructorRector::class, TypedPropertyFromStrictConstructorReadonlyClassRector::class, ParamTypeFromStrictTypedPropertyRector::class, AddVoidReturnTypeWhereNoReturnRector::class, ReturnTypeFromReturnNewRector::class, TypedPropertyFromStrictGetterMethodReturnTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, ReturnTypeFromStrictParamRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class, AddParamTypeSplFixedArrayRector::class, AddParamTypeBasedOnPHPUnitDataProviderRector::class, AddParamTypeFromPropertyTypeRector::class, AddReturnTypeDeclarationFromYieldsRector::class, ReturnTypeFromReturnDirectArrayRector::class, ReturnTypeFromStrictConstantReturnRector::class, ReturnTypeFromStrictTypedCallRector::class, ReturnNeverTypeRector::class, EmptyOnNullableObjectToInstanceOfRector::class, PropertyTypeFromStrictSetterGetterRector::class, ReturnTypeFromStrictTernaryRector::class, BoolReturnTypeFromStrictScalarReturnsRector::class, NumericReturnTypeFromStrictScalarReturnsRector::class, StrictArrayParamDimFetchRector::class]);
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ declare (strict_types=1);
|
||||
namespace Rector\PHPStanStaticTypeMapper;
|
||||
|
||||
use PHPStan\Type\ArrayType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\TypeWithClassName;
|
||||
use PHPStan\Type\UnionType;
|
||||
@ -36,4 +37,11 @@ final class DoctrineTypeAnalyzer
|
||||
}
|
||||
return $type->getClassName() === 'Doctrine\\Common\\Collections\\Collection';
|
||||
}
|
||||
public function isInstanceOfCollectionType(Type $type) : bool
|
||||
{
|
||||
if (!$type instanceof ObjectType) {
|
||||
return \false;
|
||||
}
|
||||
return $type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\TypeDeclaration\Rector\Property;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PhpParser\Node\Stmt\PropertyProperty;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\Php\PhpPropertyReflection;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\Rector\AbstractScopeAwareRector;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\Core\ValueObject\MethodName;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover;
|
||||
use Rector\PHPStanStaticTypeMapper\DoctrineTypeAnalyzer;
|
||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
use Rector\TypeDeclaration\AlreadyAssignDetector\ConstructorAssignDetector;
|
||||
use Rector\TypeDeclaration\Guard\PropertyTypeOverrideGuard;
|
||||
use Rector\TypeDeclaration\TypeAnalyzer\PropertyTypeDefaultValueAnalyzer;
|
||||
use Rector\TypeDeclaration\TypeInferer\PropertyTypeInferer\TrustedClassMethodPropertyTypeInferer;
|
||||
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorReadonlyClassRector\TypedPropertyFromStrictConstructorReadonlyClassRectorTest
|
||||
*/
|
||||
final class TypedPropertyFromStrictConstructorReadonlyClassRector extends AbstractScopeAwareRector implements MinPhpVersionInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\TypeDeclaration\TypeInferer\PropertyTypeInferer\TrustedClassMethodPropertyTypeInferer
|
||||
*/
|
||||
private $trustedClassMethodPropertyTypeInferer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover
|
||||
*/
|
||||
private $varTagRemover;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\TypeDeclaration\AlreadyAssignDetector\ConstructorAssignDetector
|
||||
*/
|
||||
private $constructorAssignDetector;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\TypeDeclaration\Guard\PropertyTypeOverrideGuard
|
||||
*/
|
||||
private $propertyTypeOverrideGuard;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PHPStanStaticTypeMapper\DoctrineTypeAnalyzer
|
||||
*/
|
||||
private $doctrineTypeAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\TypeDeclaration\TypeAnalyzer\PropertyTypeDefaultValueAnalyzer
|
||||
*/
|
||||
private $propertyTypeDefaultValueAnalyzer;
|
||||
public function __construct(TrustedClassMethodPropertyTypeInferer $trustedClassMethodPropertyTypeInferer, VarTagRemover $varTagRemover, ConstructorAssignDetector $constructorAssignDetector, PropertyTypeOverrideGuard $propertyTypeOverrideGuard, ReflectionResolver $reflectionResolver, DoctrineTypeAnalyzer $doctrineTypeAnalyzer, PropertyTypeDefaultValueAnalyzer $propertyTypeDefaultValueAnalyzer)
|
||||
{
|
||||
$this->trustedClassMethodPropertyTypeInferer = $trustedClassMethodPropertyTypeInferer;
|
||||
$this->varTagRemover = $varTagRemover;
|
||||
$this->constructorAssignDetector = $constructorAssignDetector;
|
||||
$this->propertyTypeOverrideGuard = $propertyTypeOverrideGuard;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->doctrineTypeAnalyzer = $doctrineTypeAnalyzer;
|
||||
$this->propertyTypeDefaultValueAnalyzer = $propertyTypeDefaultValueAnalyzer;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Add typed public properties based only on strict constructor types in readonly classes', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
/**
|
||||
* @immutable
|
||||
*/
|
||||
class SomeObject
|
||||
{
|
||||
public $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
/**
|
||||
* @immutable
|
||||
*/
|
||||
class SomeObject
|
||||
{
|
||||
public string $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Class_::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?Node
|
||||
{
|
||||
$constructClassMethod = $node->getMethod(MethodName::CONSTRUCT);
|
||||
if (!$constructClassMethod instanceof ClassMethod || $node->getProperties() === []) {
|
||||
return null;
|
||||
}
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
$hasChanged = \false;
|
||||
foreach ($node->getProperties() as $property) {
|
||||
if (!$this->propertyTypeOverrideGuard->isLegal($property, $classReflection)) {
|
||||
continue;
|
||||
}
|
||||
$propertyType = $this->trustedClassMethodPropertyTypeInferer->inferProperty($node, $property, $constructClassMethod);
|
||||
if ($this->shouldSkipProperty($property, $propertyType, $classReflection, $scope)) {
|
||||
continue;
|
||||
}
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
|
||||
$propertyTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($propertyType, TypeKind::PROPERTY);
|
||||
if (!$propertyTypeNode instanceof Node) {
|
||||
continue;
|
||||
}
|
||||
$propertyProperty = $property->props[0];
|
||||
$propertyName = $this->nodeNameResolver->getName($property);
|
||||
if ($this->constructorAssignDetector->isPropertyAssigned($node, $propertyName)) {
|
||||
$propertyProperty->default = null;
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($this->propertyTypeDefaultValueAnalyzer->doesConflictWithDefaultValue($propertyProperty, $propertyType)) {
|
||||
continue;
|
||||
}
|
||||
$property->type = $propertyTypeNode;
|
||||
$this->varTagRemover->removeVarTagIfUseless($phpDocInfo, $property);
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($hasChanged) {
|
||||
return $node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function provideMinPhpVersion() : int
|
||||
{
|
||||
return PhpVersionFeature::TYPED_PROPERTIES;
|
||||
}
|
||||
private function shouldSkipProperty(Property $property, Type $propertyType, ClassReflection $classReflection, Scope $scope) : bool
|
||||
{
|
||||
if (!$property->isPublic()) {
|
||||
return \true;
|
||||
}
|
||||
if ($propertyType instanceof MixedType) {
|
||||
return \true;
|
||||
}
|
||||
if ($this->doctrineTypeAnalyzer->isInstanceOfCollectionType($propertyType)) {
|
||||
return \true;
|
||||
}
|
||||
$isReadOnlyByPhpdoc = \false;
|
||||
$propertyName = $this->nodeNameResolver->getName($property);
|
||||
if ($classReflection->hasProperty($propertyName)) {
|
||||
$propertyReflection = $classReflection->getProperty($propertyName, $scope);
|
||||
if ($propertyReflection instanceof PhpPropertyReflection) {
|
||||
$isReadOnlyByPhpdoc = $propertyReflection->isReadOnlyByPhpDoc();
|
||||
}
|
||||
}
|
||||
if (!$isReadOnlyByPhpdoc) {
|
||||
return \true;
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
}
|
@ -18,9 +18,11 @@ use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\Core\ValueObject\MethodName;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover;
|
||||
use Rector\PHPStanStaticTypeMapper\DoctrineTypeAnalyzer;
|
||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
use Rector\TypeDeclaration\AlreadyAssignDetector\ConstructorAssignDetector;
|
||||
use Rector\TypeDeclaration\Guard\PropertyTypeOverrideGuard;
|
||||
use Rector\TypeDeclaration\TypeAnalyzer\PropertyTypeDefaultValueAnalyzer;
|
||||
use Rector\TypeDeclaration\TypeInferer\PropertyTypeInferer\TrustedClassMethodPropertyTypeInferer;
|
||||
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
@ -60,7 +62,17 @@ final class TypedPropertyFromStrictConstructorRector extends AbstractRector impl
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
public function __construct(TrustedClassMethodPropertyTypeInferer $trustedClassMethodPropertyTypeInferer, VarTagRemover $varTagRemover, PhpDocTypeChanger $phpDocTypeChanger, ConstructorAssignDetector $constructorAssignDetector, PropertyTypeOverrideGuard $propertyTypeOverrideGuard, ReflectionResolver $reflectionResolver)
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\PHPStanStaticTypeMapper\DoctrineTypeAnalyzer
|
||||
*/
|
||||
private $doctrineTypeAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\TypeDeclaration\TypeAnalyzer\PropertyTypeDefaultValueAnalyzer
|
||||
*/
|
||||
private $propertyTypeDefaultValueAnalyzer;
|
||||
public function __construct(TrustedClassMethodPropertyTypeInferer $trustedClassMethodPropertyTypeInferer, VarTagRemover $varTagRemover, PhpDocTypeChanger $phpDocTypeChanger, ConstructorAssignDetector $constructorAssignDetector, PropertyTypeOverrideGuard $propertyTypeOverrideGuard, ReflectionResolver $reflectionResolver, DoctrineTypeAnalyzer $doctrineTypeAnalyzer, PropertyTypeDefaultValueAnalyzer $propertyTypeDefaultValueAnalyzer)
|
||||
{
|
||||
$this->trustedClassMethodPropertyTypeInferer = $trustedClassMethodPropertyTypeInferer;
|
||||
$this->varTagRemover = $varTagRemover;
|
||||
@ -68,6 +80,8 @@ final class TypedPropertyFromStrictConstructorRector extends AbstractRector impl
|
||||
$this->constructorAssignDetector = $constructorAssignDetector;
|
||||
$this->propertyTypeOverrideGuard = $propertyTypeOverrideGuard;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->doctrineTypeAnalyzer = $doctrineTypeAnalyzer;
|
||||
$this->propertyTypeDefaultValueAnalyzer = $propertyTypeDefaultValueAnalyzer;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
@ -141,7 +155,7 @@ CODE_SAMPLE
|
||||
$propertyProperty->default = null;
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($this->doesConflictWithDefaultValue($propertyProperty, $propertyType)) {
|
||||
if ($this->propertyTypeDefaultValueAnalyzer->doesConflictWithDefaultValue($propertyProperty, $propertyType)) {
|
||||
continue;
|
||||
}
|
||||
$property->type = $propertyTypeNode;
|
||||
@ -157,28 +171,11 @@ CODE_SAMPLE
|
||||
{
|
||||
return PhpVersionFeature::TYPED_PROPERTIES;
|
||||
}
|
||||
private function doesConflictWithDefaultValue(PropertyProperty $propertyProperty, Type $propertyType) : bool
|
||||
{
|
||||
if (!$propertyProperty->default instanceof Expr) {
|
||||
return \false;
|
||||
}
|
||||
// the defaults can be in conflict
|
||||
$defaultType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($propertyProperty->default);
|
||||
// type is not matching, skip it
|
||||
return !$defaultType->isSuperTypeOf($propertyType)->yes();
|
||||
}
|
||||
private function isDoctrineCollectionType(Type $type) : bool
|
||||
{
|
||||
if (!$type instanceof ObjectType) {
|
||||
return \false;
|
||||
}
|
||||
return $type->isInstanceOf('Doctrine\\Common\\Collections\\Collection')->yes();
|
||||
}
|
||||
private function shouldSkipPropertyType(Type $propertyType) : bool
|
||||
{
|
||||
if ($propertyType instanceof MixedType) {
|
||||
return \true;
|
||||
}
|
||||
return $this->isDoctrineCollectionType($propertyType);
|
||||
return $this->doctrineTypeAnalyzer->isInstanceOfCollectionType($propertyType);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\TypeDeclaration\TypeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Stmt\PropertyProperty;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
final class PropertyTypeDefaultValueAnalyzer
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\StaticTypeMapper\StaticTypeMapper
|
||||
*/
|
||||
private $staticTypeMapper;
|
||||
public function __construct(StaticTypeMapper $staticTypeMapper)
|
||||
{
|
||||
$this->staticTypeMapper = $staticTypeMapper;
|
||||
}
|
||||
public function doesConflictWithDefaultValue(PropertyProperty $propertyProperty, Type $propertyType) : bool
|
||||
{
|
||||
if (!$propertyProperty->default instanceof Expr) {
|
||||
return \false;
|
||||
}
|
||||
// the defaults can be in conflict
|
||||
$defaultType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($propertyProperty->default);
|
||||
// type is not matching, skip it
|
||||
return !$defaultType->isSuperTypeOf($propertyType)->yes();
|
||||
}
|
||||
}
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c12703def127562155efcee2c348ca3a4d08c170';
|
||||
public const PACKAGE_VERSION = 'a8ae2d8c2a92536f95a70dc99eaebb01168c4a6f';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-23 18:19:26';
|
||||
public const RELEASE_DATE = '2023-07-23 17:08:46';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInitc57a4a84ff14fb5da81d649a75cccd6c::getLoader();
|
||||
return ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268::getLoader();
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -2706,6 +2706,7 @@ return array(
|
||||
'Rector\\TypeDeclaration\\Rector\\Param\\ParamTypeFromStrictTypedPropertyRector' => $baseDir . '/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\AddPropertyTypeDeclarationRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromAssignsRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromAssignsRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorReadonlyClassRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorReadonlyClassRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php',
|
||||
@ -2717,6 +2718,7 @@ return array(
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictScalarExprAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\GenericClassStringTypeNormalizer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/GenericClassStringTypeNormalizer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\NullableTypeAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/NullableTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\PropertyTypeDefaultValueAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/PropertyTypeDefaultValueAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\ReturnStrictTypeAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\StrictReturnClassConstReturnTypeAnalyzer' => $baseDir . '/rules/TypeDeclaration/TypeAnalyzer/StrictReturnClassConstReturnTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeInferer\\AssignToPropertyTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/AssignToPropertyTypeInferer.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 ComposerAutoloaderInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
class ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc57a4a84ff14fb5da81d649a75cccd6c', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc57a4a84ff14fb5da81d649a75cccd6c', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2a6c2d46859027bd63fed619863b9268::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$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 ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
class ComposerStaticInit2a6c2d46859027bd63fed619863b9268
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -2960,6 +2960,7 @@ class ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
'Rector\\TypeDeclaration\\Rector\\Param\\ParamTypeFromStrictTypedPropertyRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\AddPropertyTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromAssignsRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromAssignsRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorReadonlyClassRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorReadonlyClassRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php',
|
||||
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php',
|
||||
@ -2971,6 +2972,7 @@ class ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\AlwaysStrictScalarExprAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\GenericClassStringTypeNormalizer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/GenericClassStringTypeNormalizer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\NullableTypeAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/NullableTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\PropertyTypeDefaultValueAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/PropertyTypeDefaultValueAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\ReturnStrictTypeAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeAnalyzer\\StrictReturnClassConstReturnTypeAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeAnalyzer/StrictReturnClassConstReturnTypeAnalyzer.php',
|
||||
'Rector\\TypeDeclaration\\TypeInferer\\AssignToPropertyTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/AssignToPropertyTypeInferer.php',
|
||||
@ -3020,9 +3022,9 @@ class ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitc57a4a84ff14fb5da81d649a75cccd6c::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user