mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-30 07:50:53 +00:00
Updated Rector to commit 3f2a16a0166d301162482c91d2ead5e9125c0d14
3f2a16a016
[Php80] Make configurable INLINE_PUBLIC on ClassPropertyAssignToConstructorPromotionRector (#3126)
This commit is contained in:
parent
05f2f137c6
commit
782f920c5f
|
@ -1,4 +1,4 @@
|
|||
# 406 Rules Overview
|
||||
# 409 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
|||
|
||||
- [Transform](#transform) (34)
|
||||
|
||||
- [TypeDeclaration](#typedeclaration) (34)
|
||||
- [TypeDeclaration](#typedeclaration) (37)
|
||||
|
||||
- [Visibility](#visibility) (3)
|
||||
|
||||
|
@ -5659,23 +5659,8 @@ Add null default to properties with PHP 7.4 property nullable type
|
|||
|
||||
Changes property type by `@var` annotations or default value.
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Php74\Rector\Property\TypedPropertyRector`](../rules/Php74/Rector/Property/TypedPropertyRector.php)
|
||||
|
||||
```php
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->ruleWithConfiguration(TypedPropertyRector::class, [
|
||||
TypedPropertyRector::INLINE_PUBLIC => false,
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
final class SomeClass
|
||||
{
|
||||
|
@ -5826,8 +5811,23 @@ Change `$this::class` to static::class or self::class depends on class modifier
|
|||
|
||||
Change simple property init and assign to constructor promotion
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector`](../rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php)
|
||||
|
||||
```php
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->ruleWithConfiguration(ClassPropertyAssignToConstructorPromotionRector::class, [
|
||||
ClassPropertyAssignToConstructorPromotionRector::INLINE_PUBLIC => false,
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
|
@ -9296,6 +9296,25 @@ Change `@return` types and type from static analysis to type declarations if not
|
|||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromReturnDirectArrayRector
|
||||
|
||||
Add return type from return direct array
|
||||
|
||||
- class: [`Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector`](../rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnDirectArrayRector.php)
|
||||
|
||||
```diff
|
||||
final class AddReturnArray
|
||||
{
|
||||
- public function getArray()
|
||||
+ public function getArray(): array
|
||||
{
|
||||
return [1, 2, 3];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromReturnNewRector
|
||||
|
||||
Add return type to function like with return new
|
||||
|
@ -9334,6 +9353,27 @@ Add strict return type based on returned strict expr type
|
|||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromStrictConstantReturnRector
|
||||
|
||||
Add strict type declaration based on returned constants
|
||||
|
||||
- class: [`Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector`](../rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictConstantReturnRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public const NAME = 'name';
|
||||
|
||||
- public function run()
|
||||
+ public function run(): string
|
||||
{
|
||||
return self::NAME;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromStrictNativeCallRector
|
||||
|
||||
Add strict return type based native function or class method return
|
||||
|
@ -9374,6 +9414,30 @@ Add strict return array type based on created empty array and returned
|
|||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromStrictTypedCallRector
|
||||
|
||||
Add return type from strict return type of call
|
||||
|
||||
- class: [`Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector`](../rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector.php)
|
||||
|
||||
```diff
|
||||
final class SomeClass
|
||||
{
|
||||
- public function getData()
|
||||
+ public function getData(): int
|
||||
{
|
||||
return $this->getNumber();
|
||||
}
|
||||
|
||||
private function getNumber(): int
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ReturnTypeFromStrictTypedPropertyRector
|
||||
|
||||
Add return method return type based on strict typed property
|
||||
|
|
|
@ -3,94 +3,23 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\Php74\Guard;
|
||||
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\NodeAnalyzer\PropertyAnalyzer;
|
||||
use Rector\Core\NodeManipulator\PropertyManipulator;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Privatization\Guard\ParentPropertyLookupGuard;
|
||||
final class MakePropertyTypedGuard
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
* @var \Rector\Php74\Guard\PropertyTypeChangeGuard
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeAnalyzer\PropertyAnalyzer
|
||||
*/
|
||||
private $propertyAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeManipulator\PropertyManipulator
|
||||
*/
|
||||
private $propertyManipulator;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Privatization\Guard\ParentPropertyLookupGuard
|
||||
*/
|
||||
private $parentPropertyLookupGuard;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
public function __construct(NodeNameResolver $nodeNameResolver, PropertyAnalyzer $propertyAnalyzer, PropertyManipulator $propertyManipulator, ParentPropertyLookupGuard $parentPropertyLookupGuard, ReflectionResolver $reflectionResolver)
|
||||
private $propertyTypeChangeGuard;
|
||||
public function __construct(\Rector\Php74\Guard\PropertyTypeChangeGuard $propertyTypeChangeGuard)
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
$this->propertyAnalyzer = $propertyAnalyzer;
|
||||
$this->propertyManipulator = $propertyManipulator;
|
||||
$this->parentPropertyLookupGuard = $parentPropertyLookupGuard;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->propertyTypeChangeGuard = $propertyTypeChangeGuard;
|
||||
}
|
||||
public function isLegal(Property $property, bool $inlinePublic = \true) : bool
|
||||
{
|
||||
if ($property->type !== null) {
|
||||
return \false;
|
||||
}
|
||||
if (\count($property->props) > 1) {
|
||||
return \false;
|
||||
}
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($property);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
/**
|
||||
* - trait properties are unpredictable based on class context they appear in
|
||||
* - on interface properties as well, as interface not allowed to have property
|
||||
*/
|
||||
if (!$classReflection->isClass()) {
|
||||
return \false;
|
||||
}
|
||||
$propertyName = $this->nodeNameResolver->getName($property);
|
||||
if ($this->propertyManipulator->isUsedByTrait($classReflection, $propertyName)) {
|
||||
return \false;
|
||||
}
|
||||
if ($inlinePublic) {
|
||||
return !$this->propertyAnalyzer->hasForbiddenType($property);
|
||||
}
|
||||
if ($property->isPrivate()) {
|
||||
return !$this->propertyAnalyzer->hasForbiddenType($property);
|
||||
}
|
||||
return $this->isSafeProtectedProperty($property);
|
||||
}
|
||||
private function isSafeProtectedProperty(Property $property) : bool
|
||||
{
|
||||
if (!$property->isProtected()) {
|
||||
return \false;
|
||||
}
|
||||
$parentNode = $property->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if (!$parentNode instanceof Class_) {
|
||||
throw new ShouldNotHappenException();
|
||||
}
|
||||
if (!$parentNode->isFinal()) {
|
||||
return \false;
|
||||
}
|
||||
return $this->parentPropertyLookupGuard->isLegal($property);
|
||||
return $this->propertyTypeChangeGuard->isLegal($property, $inlinePublic);
|
||||
}
|
||||
}
|
||||
|
|
99
rules/Php74/Guard/PropertyTypeChangeGuard.php
Normal file
99
rules/Php74/Guard/PropertyTypeChangeGuard.php
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php74\Guard;
|
||||
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\NodeAnalyzer\PropertyAnalyzer;
|
||||
use Rector\Core\NodeManipulator\PropertyManipulator;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Privatization\Guard\ParentPropertyLookupGuard;
|
||||
final class PropertyTypeChangeGuard
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeAnalyzer\PropertyAnalyzer
|
||||
*/
|
||||
private $propertyAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeManipulator\PropertyManipulator
|
||||
*/
|
||||
private $propertyManipulator;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Privatization\Guard\ParentPropertyLookupGuard
|
||||
*/
|
||||
private $parentPropertyLookupGuard;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
public function __construct(NodeNameResolver $nodeNameResolver, PropertyAnalyzer $propertyAnalyzer, PropertyManipulator $propertyManipulator, ParentPropertyLookupGuard $parentPropertyLookupGuard, ReflectionResolver $reflectionResolver)
|
||||
{
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
$this->propertyAnalyzer = $propertyAnalyzer;
|
||||
$this->propertyManipulator = $propertyManipulator;
|
||||
$this->parentPropertyLookupGuard = $parentPropertyLookupGuard;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
}
|
||||
public function isLegal(Property $property, bool $inlinePublic = \true, bool $isConstructorPromotion = \false) : bool
|
||||
{
|
||||
if (\count($property->props) > 1) {
|
||||
return \false;
|
||||
}
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($property);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
/**
|
||||
* - trait properties are unpredictable based on class context they appear in
|
||||
* - on interface properties as well, as interface not allowed to have property
|
||||
*/
|
||||
if (!$classReflection->isClass()) {
|
||||
return \false;
|
||||
}
|
||||
$propertyName = $this->nodeNameResolver->getName($property);
|
||||
if ($this->propertyManipulator->isUsedByTrait($classReflection, $propertyName)) {
|
||||
return \false;
|
||||
}
|
||||
if ($this->propertyAnalyzer->hasForbiddenType($property)) {
|
||||
return \false;
|
||||
}
|
||||
if ($inlinePublic) {
|
||||
return \true;
|
||||
}
|
||||
if ($property->isPrivate()) {
|
||||
return \true;
|
||||
}
|
||||
if ($isConstructorPromotion) {
|
||||
return \true;
|
||||
}
|
||||
return $this->isSafeProtectedProperty($property);
|
||||
}
|
||||
private function isSafeProtectedProperty(Property $property) : bool
|
||||
{
|
||||
if (!$property->isProtected()) {
|
||||
return \false;
|
||||
}
|
||||
$parentNode = $property->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if (!$parentNode instanceof Class_) {
|
||||
throw new ShouldNotHappenException();
|
||||
}
|
||||
if (!$parentNode->isFinal()) {
|
||||
return \false;
|
||||
}
|
||||
return $this->parentPropertyLookupGuard->isLegal($property);
|
||||
}
|
||||
}
|
41
rules/Php80/Guard/MakePropertyPromotionGuard.php
Normal file
41
rules/Php80/Guard/MakePropertyPromotionGuard.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php80\Guard;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Param;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use Rector\Php74\Guard\PropertyTypeChangeGuard;
|
||||
final class MakePropertyPromotionGuard
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Php74\Guard\PropertyTypeChangeGuard
|
||||
*/
|
||||
private $propertyTypeChangeGuard;
|
||||
public function __construct(PropertyTypeChangeGuard $propertyTypeChangeGuard)
|
||||
{
|
||||
$this->propertyTypeChangeGuard = $propertyTypeChangeGuard;
|
||||
}
|
||||
public function isLegal(Class_ $class, Property $property, Param $param, bool $inlinePublic = \true) : bool
|
||||
{
|
||||
if (!$this->propertyTypeChangeGuard->isLegal($property, $inlinePublic, \true)) {
|
||||
return \false;
|
||||
}
|
||||
if ($class->isFinal()) {
|
||||
return \true;
|
||||
}
|
||||
if ($inlinePublic) {
|
||||
return \true;
|
||||
}
|
||||
if ($property->isPrivate()) {
|
||||
return \true;
|
||||
}
|
||||
if (!$param->type instanceof Node) {
|
||||
return \true;
|
||||
}
|
||||
return $property->type instanceof Node;
|
||||
}
|
||||
}
|
|
@ -15,26 +15,42 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
|||
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\Core\Contract\Rector\AllowEmptyConfigurableRectorInterface;
|
||||
use Rector\Core\NodeAnalyzer\ParamAnalyzer;
|
||||
use Rector\Core\NodeAnalyzer\PropertyAnalyzer;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\ValueObject\MethodName;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover;
|
||||
use Rector\Naming\VariableRenamer;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php80\Guard\MakePropertyPromotionGuard;
|
||||
use Rector\Php80\NodeAnalyzer\PromotedPropertyCandidateResolver;
|
||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @changelog https://wiki.php.net/rfc/constructor_promotion https://github.com/php/php-src/pull/5291
|
||||
*
|
||||
* @see \Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\ClassPropertyAssignToConstructorPromotionRectorTest
|
||||
*/
|
||||
final class ClassPropertyAssignToConstructorPromotionRector extends AbstractRector implements MinPhpVersionInterface
|
||||
final class ClassPropertyAssignToConstructorPromotionRector extends AbstractRector implements MinPhpVersionInterface, AllowEmptyConfigurableRectorInterface
|
||||
{
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const INLINE_PUBLIC = 'inline_public';
|
||||
/**
|
||||
* Default to false, which only apply changes:
|
||||
*
|
||||
* – private modifier property
|
||||
* - protected/public modifier property when property typed
|
||||
*
|
||||
* Set to true will allow change whether property is typed or not as far as not forbidden, eg: callable type, null type, etc.
|
||||
* @var bool
|
||||
*/
|
||||
private $inlinePublic = \false;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Php80\NodeAnalyzer\PromotedPropertyCandidateResolver
|
||||
|
@ -62,21 +78,21 @@ final class ClassPropertyAssignToConstructorPromotionRector extends AbstractRect
|
|||
private $phpDocTypeChanger;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeAnalyzer\PropertyAnalyzer
|
||||
* @var \Rector\Php80\Guard\MakePropertyPromotionGuard
|
||||
*/
|
||||
private $propertyAnalyzer;
|
||||
public function __construct(PromotedPropertyCandidateResolver $promotedPropertyCandidateResolver, VariableRenamer $variableRenamer, VarTagRemover $varTagRemover, ParamAnalyzer $paramAnalyzer, PhpDocTypeChanger $phpDocTypeChanger, PropertyAnalyzer $propertyAnalyzer)
|
||||
private $makePropertyPromotionGuard;
|
||||
public function __construct(PromotedPropertyCandidateResolver $promotedPropertyCandidateResolver, VariableRenamer $variableRenamer, VarTagRemover $varTagRemover, ParamAnalyzer $paramAnalyzer, PhpDocTypeChanger $phpDocTypeChanger, MakePropertyPromotionGuard $makePropertyPromotionGuard)
|
||||
{
|
||||
$this->promotedPropertyCandidateResolver = $promotedPropertyCandidateResolver;
|
||||
$this->variableRenamer = $variableRenamer;
|
||||
$this->varTagRemover = $varTagRemover;
|
||||
$this->paramAnalyzer = $paramAnalyzer;
|
||||
$this->phpDocTypeChanger = $phpDocTypeChanger;
|
||||
$this->propertyAnalyzer = $propertyAnalyzer;
|
||||
$this->makePropertyPromotionGuard = $makePropertyPromotionGuard;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Change simple property init and assign to constructor promotion', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
return new RuleDefinition('Change simple property init and assign to constructor promotion', [new ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass
|
||||
{
|
||||
public float $someVariable;
|
||||
|
@ -97,7 +113,11 @@ class SomeClass
|
|||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
, [self::INLINE_PUBLIC => \false])]);
|
||||
}
|
||||
public function configure(array $configuration) : void
|
||||
{
|
||||
$this->inlinePublic = $configuration[self::INLINE_PUBLIC] ?? (bool) \current($configuration);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
|
@ -125,7 +145,7 @@ CODE_SAMPLE
|
|||
if ($this->shouldSkipParam($param)) {
|
||||
continue;
|
||||
}
|
||||
if ($this->propertyAnalyzer->hasForbiddenType($property)) {
|
||||
if (!$this->makePropertyPromotionGuard->isLegal($node, $property, $param, $this->inlinePublic)) {
|
||||
continue;
|
||||
}
|
||||
$this->removeNode($property);
|
||||
|
|
|
@ -17,12 +17,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '2b35d2e75ea03ffe643c012485952ec6df3ea2ba';
|
||||
public const PACKAGE_VERSION = '3f2a16a0166d301162482c91d2ead5e9125c0d14';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-11-28 21:37:23';
|
||||
public const RELEASE_DATE = '2022-11-29 16:43:58';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2::getLoader();
|
||||
return ComposerAutoloaderInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::getLoader();
|
||||
|
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
|
@ -2135,6 +2135,7 @@ return array(
|
|||
'Rector\\Php73\\Rector\\FuncCall\\StringifyStrNeedlesRector' => $baseDir . '/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php',
|
||||
'Rector\\Php73\\Rector\\String_\\SensitiveHereNowDocRector' => $baseDir . '/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php',
|
||||
'Rector\\Php74\\Guard\\MakePropertyTypedGuard' => $baseDir . '/rules/Php74/Guard/MakePropertyTypedGuard.php',
|
||||
'Rector\\Php74\\Guard\\PropertyTypeChangeGuard' => $baseDir . '/rules/Php74/Guard/PropertyTypeChangeGuard.php',
|
||||
'Rector\\Php74\\NodeAnalyzer\\ClosureArrowFunctionAnalyzer' => $baseDir . '/rules/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php',
|
||||
'Rector\\Php74\\Rector\\ArrayDimFetch\\CurlyToSquareBracketArrayStringRector' => $baseDir . '/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php',
|
||||
'Rector\\Php74\\Rector\\Assign\\NullCoalescingOperatorRector' => $baseDir . '/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php',
|
||||
|
@ -2160,6 +2161,7 @@ return array(
|
|||
'Rector\\Php80\\Contract\\StrStartWithMatchAndRefactorInterface' => $baseDir . '/rules/Php80/Contract/StrStartWithMatchAndRefactorInterface.php',
|
||||
'Rector\\Php80\\Contract\\ValueObject\\AnnotationToAttributeInterface' => $baseDir . '/rules/Php80/Contract/ValueObject/AnnotationToAttributeInterface.php',
|
||||
'Rector\\Php80\\Enum\\MatchKind' => $baseDir . '/rules/Php80/Enum/MatchKind.php',
|
||||
'Rector\\Php80\\Guard\\MakePropertyPromotionGuard' => $baseDir . '/rules/Php80/Guard/MakePropertyPromotionGuard.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrncmpMatchAndRefactor' => $baseDir . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrposMatchAndRefactor' => $baseDir . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\SubstrMatchAndRefactor' => $baseDir . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.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 ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
||||
class ComposerAutoloaderInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire0a47a55ab3e76f4b719a1305ae1e8fe2($fileIdentifier, $file);
|
||||
composerRequired3ff6a7d8cba5f5a6ce5595d57e0fdfb($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire0a47a55ab3e76f4b719a1305ae1e8fe2($fileIdentifier, $file)
|
||||
function composerRequired3ff6a7d8cba5f5a6ce5595d57e0fdfb($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 ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
||||
class ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -2380,6 +2380,7 @@ class ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
|||
'Rector\\Php73\\Rector\\FuncCall\\StringifyStrNeedlesRector' => __DIR__ . '/../..' . '/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php',
|
||||
'Rector\\Php73\\Rector\\String_\\SensitiveHereNowDocRector' => __DIR__ . '/../..' . '/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php',
|
||||
'Rector\\Php74\\Guard\\MakePropertyTypedGuard' => __DIR__ . '/../..' . '/rules/Php74/Guard/MakePropertyTypedGuard.php',
|
||||
'Rector\\Php74\\Guard\\PropertyTypeChangeGuard' => __DIR__ . '/../..' . '/rules/Php74/Guard/PropertyTypeChangeGuard.php',
|
||||
'Rector\\Php74\\NodeAnalyzer\\ClosureArrowFunctionAnalyzer' => __DIR__ . '/../..' . '/rules/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php',
|
||||
'Rector\\Php74\\Rector\\ArrayDimFetch\\CurlyToSquareBracketArrayStringRector' => __DIR__ . '/../..' . '/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php',
|
||||
'Rector\\Php74\\Rector\\Assign\\NullCoalescingOperatorRector' => __DIR__ . '/../..' . '/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php',
|
||||
|
@ -2405,6 +2406,7 @@ class ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
|||
'Rector\\Php80\\Contract\\StrStartWithMatchAndRefactorInterface' => __DIR__ . '/../..' . '/rules/Php80/Contract/StrStartWithMatchAndRefactorInterface.php',
|
||||
'Rector\\Php80\\Contract\\ValueObject\\AnnotationToAttributeInterface' => __DIR__ . '/../..' . '/rules/Php80/Contract/ValueObject/AnnotationToAttributeInterface.php',
|
||||
'Rector\\Php80\\Enum\\MatchKind' => __DIR__ . '/../..' . '/rules/Php80/Enum/MatchKind.php',
|
||||
'Rector\\Php80\\Guard\\MakePropertyPromotionGuard' => __DIR__ . '/../..' . '/rules/Php80/Guard/MakePropertyPromotionGuard.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrncmpMatchAndRefactor' => __DIR__ . '/../..' . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrposMatchAndRefactor' => __DIR__ . '/../..' . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\SubstrMatchAndRefactor' => __DIR__ . '/../..' . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php',
|
||||
|
@ -3019,9 +3021,9 @@ class ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0a47a55ab3e76f4b719a1305ae1e8fe2::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd3ff6a7d8cba5f5a6ce5595d57e0fdfb::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user