mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-29 07:20:52 +00:00
Updated Rector to commit a31ae50227e48b078b9a3e78da55507a23127887
a31ae50227
Add Missing in Set Command to CI + complete sets from their category (#3141)
This commit is contained in:
parent
91e646a878
commit
3c99dc15fc
|
@ -14,8 +14,11 @@ use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
|
|||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
||||
use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector;
|
||||
use Rector\CodeQuality\Rector\ClassMethod\NarrowUnionTypeDocRector;
|
||||
use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
|
||||
use Rector\CodeQuality\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector;
|
||||
use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;
|
||||
use Rector\CodeQuality\Rector\Do_\DoWhileBreakFalseToIfElseRector;
|
||||
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
|
||||
use Rector\CodeQuality\Rector\Equal\UseIdenticalOverEqualWithSameTypeRector;
|
||||
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
|
||||
use Rector\CodeQuality\Rector\Expression\TernaryFalseExpressionToIfRector;
|
||||
|
@ -111,6 +114,5 @@ return static function (RectorConfig $rectorConfig) : void {
|
|||
'mbstrrpos' => 'mb_strrpos',
|
||||
'mbsubstr' => 'mb_substr',
|
||||
]);
|
||||
$rectorConfig->rules([CombinedAssignRector::class, SimplifyEmptyArrayCheckRector::class, ReplaceMultipleBooleanNotRector::class, ForeachToInArrayRector::class, SimplifyForeachToCoalescingRector::class, SimplifyFuncGetArgsCountRector::class, SimplifyInArrayValuesRector::class, SimplifyStrposLowerRector::class, GetClassToInstanceOfRector::class, SimplifyArraySearchRector::class, SimplifyConditionsRector::class, SimplifyIfNotNullReturnRector::class, SimplifyIfReturnBoolRector::class, SimplifyUselessVariableRector::class, UnnecessaryTernaryExpressionRector::class, RemoveExtraParametersRector::class, SimplifyDeMorganBinaryRector::class, SimplifyTautologyTernaryRector::class, SimplifyForeachToArrayFilterRector::class, SingleInArrayToCompareRector::class, SimplifyIfElseToTernaryRector::class, JoinStringConcatRector::class, ConsecutiveNullCompareReturnsToNullCoalesceQueueRector::class, ExplicitBoolCompareRector::class, CombineIfRector::class, UseIdenticalOverEqualWithSameTypeRector::class, SimplifyBoolIdenticalTrueRector::class, SimplifyRegexPatternRector::class, BooleanNotIdenticalToNotIdenticalRector::class, StrvalToTypeCastRector::class, FloatvalToTypeCastRector::class, CallableThisArrayToAnonymousFunctionRector::class, AndAssignsToSeparateLinesRector::class, ForToForeachRector::class, CompactToVariablesRector::class, CompleteDynamicPropertiesRector::class, IsAWithStringWithThirdArgumentRector::class, StrlenZeroToIdenticalEmptyStringRector::class, RemoveAlwaysTrueConditionSetInConstructorRector::class, ThrowWithPreviousExceptionRector::class, RemoveSoleValueSprintfRector::class, ShortenElseIfRector::class, AddPregQuoteDelimiterRector::class, ArrayMergeOfNonArraysToSimpleArrayRector::class, IntvalToTypeCastRector::class, BoolvalToTypeCastRector::class, ArrayKeyExistsTernaryThenValueToCoalescingRector::class, AbsolutizeRequireAndIncludePathRector::class, ChangeArrayPushToArrayAssignRector::class, ForRepeatedCountToOwnVariableRector::class, ForeachItemsAssignToEmptyArrayToAssignRector::class, InlineIfToExplicitIfRector::class, ArrayKeysAndInArrayToArrayKeyExistsRector::class, SplitListAssignToSeparateLineRector::class, UnusedForeachValueToArrayKeysRector::class, CommonNotEqualRector::class, SetTypeToCastRector::class, LogicalToBooleanRector::class, VarToPublicPropertyRector::class, IssetOnPropertyObjectToPropertyExistsRector::class, NewStaticToNewSelfRector::class, UnwrapSprintfOneArgumentRector::class, SwitchNegatedTernaryRector::class, SingularSwitchToIfRector::class, SimplifyIfNullableReturnRector::class, NarrowUnionTypeDocRector::class, FuncGetArgsToVariadicParamRector::class, CallUserFuncToMethodCallRector::class, CallUserFuncWithArrowFunctionToInlineRector::class, CountArrayToEmptyArrayComparisonRector::class, FlipTypeControlToUseExclusiveTypeRector::class, ExplicitMethodCallOverMagicGetSetRector::class, DoWhileBreakFalseToIfElseRector::class, InlineArrayReturnAssignRector::class, InlineIsAInstanceOfRector::class, TernaryFalseExpressionToIfRector::class, InlineConstructorDefaultToPropertyRector::class, SimplifyIfExactValueReturnValueRector::class, SimplifyUselessLastVariableAssignRector::class]);
|
||||
$rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class);
|
||||
$rectorConfig->rules([CombinedAssignRector::class, SimplifyEmptyArrayCheckRector::class, ReplaceMultipleBooleanNotRector::class, ForeachToInArrayRector::class, SimplifyForeachToCoalescingRector::class, SimplifyFuncGetArgsCountRector::class, SimplifyInArrayValuesRector::class, SimplifyStrposLowerRector::class, GetClassToInstanceOfRector::class, SimplifyArraySearchRector::class, SimplifyConditionsRector::class, SimplifyIfNotNullReturnRector::class, SimplifyIfReturnBoolRector::class, SimplifyUselessVariableRector::class, UnnecessaryTernaryExpressionRector::class, RemoveExtraParametersRector::class, SimplifyDeMorganBinaryRector::class, SimplifyTautologyTernaryRector::class, SimplifyForeachToArrayFilterRector::class, SingleInArrayToCompareRector::class, SimplifyIfElseToTernaryRector::class, JoinStringConcatRector::class, ConsecutiveNullCompareReturnsToNullCoalesceQueueRector::class, ExplicitBoolCompareRector::class, CombineIfRector::class, UseIdenticalOverEqualWithSameTypeRector::class, SimplifyBoolIdenticalTrueRector::class, SimplifyRegexPatternRector::class, BooleanNotIdenticalToNotIdenticalRector::class, StrvalToTypeCastRector::class, FloatvalToTypeCastRector::class, CallableThisArrayToAnonymousFunctionRector::class, AndAssignsToSeparateLinesRector::class, ForToForeachRector::class, CompactToVariablesRector::class, CompleteDynamicPropertiesRector::class, IsAWithStringWithThirdArgumentRector::class, StrlenZeroToIdenticalEmptyStringRector::class, RemoveAlwaysTrueConditionSetInConstructorRector::class, ThrowWithPreviousExceptionRector::class, RemoveSoleValueSprintfRector::class, ShortenElseIfRector::class, AddPregQuoteDelimiterRector::class, ArrayMergeOfNonArraysToSimpleArrayRector::class, IntvalToTypeCastRector::class, BoolvalToTypeCastRector::class, ArrayKeyExistsTernaryThenValueToCoalescingRector::class, AbsolutizeRequireAndIncludePathRector::class, ChangeArrayPushToArrayAssignRector::class, ForRepeatedCountToOwnVariableRector::class, ForeachItemsAssignToEmptyArrayToAssignRector::class, InlineIfToExplicitIfRector::class, ArrayKeysAndInArrayToArrayKeyExistsRector::class, SplitListAssignToSeparateLineRector::class, UnusedForeachValueToArrayKeysRector::class, CommonNotEqualRector::class, SetTypeToCastRector::class, LogicalToBooleanRector::class, VarToPublicPropertyRector::class, IssetOnPropertyObjectToPropertyExistsRector::class, NewStaticToNewSelfRector::class, UnwrapSprintfOneArgumentRector::class, SwitchNegatedTernaryRector::class, SingularSwitchToIfRector::class, SimplifyIfNullableReturnRector::class, NarrowUnionTypeDocRector::class, FuncGetArgsToVariadicParamRector::class, CallUserFuncToMethodCallRector::class, CallUserFuncWithArrowFunctionToInlineRector::class, CountArrayToEmptyArrayComparisonRector::class, FlipTypeControlToUseExclusiveTypeRector::class, ExplicitMethodCallOverMagicGetSetRector::class, DoWhileBreakFalseToIfElseRector::class, InlineArrayReturnAssignRector::class, InlineIsAInstanceOfRector::class, TernaryFalseExpressionToIfRector::class, InlineConstructorDefaultToPropertyRector::class, SimplifyIfExactValueReturnValueRector::class, SimplifyUselessLastVariableAssignRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, TernaryEmptyArrayArrayDimFetchToCoalesceRector::class, OptionalParametersAfterRequiredRector::class, SimplifyEmptyCheckOnEmptyArrayRector::class]);
|
||||
};
|
||||
|
|
|
@ -31,6 +31,7 @@ use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
|
|||
use Rector\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector;
|
||||
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
|
||||
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
|
||||
use Rector\CodingStyle\Rector\String_\UseClassKeywordForClassNameResolutionRector;
|
||||
use Rector\CodingStyle\Rector\Switch_\BinarySwitchToIfElseRector;
|
||||
use Rector\CodingStyle\Rector\Ternary\TernaryConditionVariableAssignmentRector;
|
||||
use Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector;
|
||||
|
@ -39,5 +40,5 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
|||
use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->ruleWithConfiguration(FuncCallToConstFetchRector::class, ['php_sapi_name' => 'PHP_SAPI', 'pi' => 'M_PI']);
|
||||
$rectorConfig->rules([SeparateMultiUseImportsRector::class, RemoveDoubleUnderscoreInMethodNameRector::class, PostIncDecToPreIncDecRector::class, UnSpreadOperatorRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, SplitGroupedConstantsAndPropertiesRector::class, StringClassNameToClassConstantRector::class, ConsistentPregDelimiterRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, VarConstantCommentRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, AddFalseDefaultToBoolPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class]);
|
||||
$rectorConfig->rules([SeparateMultiUseImportsRector::class, RemoveDoubleUnderscoreInMethodNameRector::class, PostIncDecToPreIncDecRector::class, UnSpreadOperatorRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, SplitGroupedConstantsAndPropertiesRector::class, StringClassNameToClassConstantRector::class, ConsistentPregDelimiterRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, VarConstantCommentRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, AddFalseDefaultToBoolPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class, UseClassKeywordForClassNameResolutionRector::class]);
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@ use Rector\TypeDeclaration\Rector\ClassMethod\ParamAnnotationIncorrectNullableRe
|
|||
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnAnnotationIncorrectNullableRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
|
||||
|
@ -34,5 +35,5 @@ use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodRe
|
|||
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, ArrayShapeFromConstantArrayReturnRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class, AddParamTypeSplFixedArrayRector::class, AddParamTypeBasedOnPHPUnitDataProviderRector::class, AddParamTypeFromPropertyTypeRector::class, AddReturnTypeDeclarationFromYieldsRector::class, ReturnTypeFromReturnDirectArrayRector::class, ReturnTypeFromStrictConstantReturnRector::class, ReturnTypeFromStrictTypedCallRector::class]);
|
||||
$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, ArrayShapeFromConstantArrayReturnRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class, AddParamTypeSplFixedArrayRector::class, AddParamTypeBasedOnPHPUnitDataProviderRector::class, AddParamTypeFromPropertyTypeRector::class, AddReturnTypeDeclarationFromYieldsRector::class, ReturnTypeFromReturnDirectArrayRector::class, ReturnTypeFromStrictConstantReturnRector::class, ReturnTypeFromStrictTypedCallRector::class, ReturnNeverTypeRector::class]);
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@ use PhpParser\Node\Name\FullyQualified;
|
|||
use PhpParser\Node\Scalar\String_;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
|
@ -53,6 +54,10 @@ CODE_SAMPLE
|
|||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
{
|
||||
$stringKind = $node->getAttribute(AttributeKey::KIND);
|
||||
if (\in_array($stringKind, [String_::KIND_HEREDOC, String_::KIND_NOWDOC], \true)) {
|
||||
return null;
|
||||
}
|
||||
$classNames = $this->getExistingClasses($node);
|
||||
if ($classNames === []) {
|
||||
return $node;
|
||||
|
|
|
@ -13,6 +13,7 @@ use PhpParser\Node\Stmt\ClassMethod;
|
|||
use PhpParser\Node\Stmt\Foreach_;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PhpParser\Node\Stmt\If_;
|
||||
use PhpToken;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
@ -49,7 +50,7 @@ final class TokenGetAllToObjectRector extends AbstractRector implements MinPhpVe
|
|||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Convert `token_get_all` to `PhpToken::tokenize`', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
return new RuleDefinition('Convert `token_get_all` to `' . PhpToken::class . '::tokenize`', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
final class SomeClass
|
||||
{
|
||||
public function run()
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Rector\TypeDeclaration\Rector\ClassMethod;
|
|||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use Rector\Core\Contract\Rector\DeprecatedRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use RectorPrefix202212\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -12,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
/**
|
||||
* @deprecated Use specific rules working with strict type declarations instead.
|
||||
*/
|
||||
final class AddArrayParamDocTypeRector extends AbstractRector
|
||||
final class AddArrayParamDocTypeRector extends AbstractRector implements DeprecatedRectorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Rector\TypeDeclaration\Rector\ClassMethod;
|
|||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use Rector\Core\Contract\Rector\DeprecatedRectorInterface;
|
||||
use Rector\Core\Rector\AbstractScopeAwareRector;
|
||||
use RectorPrefix202212\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -13,7 +14,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
/**
|
||||
* @deprecated Use specific rules working with strict type declarations instead of this docs blocks non-reliable one
|
||||
*/
|
||||
final class AddArrayReturnDocTypeRector extends AbstractScopeAwareRector
|
||||
final class AddArrayReturnDocTypeRector extends AbstractScopeAwareRector implements DeprecatedRectorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Rector\TypeDeclaration\Rector\FunctionLike;
|
|||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use Rector\Core\Contract\Rector\DeprecatedRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use RectorPrefix202212\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -14,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @deprecated Moving doc types to type declarations is dangerous. Use specific strict type inferers instead.
|
||||
* Use specific rules to infer params instead. This rule will be split info many small ones.
|
||||
*/
|
||||
final class ParamTypeDeclarationRector extends AbstractRector
|
||||
final class ParamTypeDeclarationRector extends AbstractRector implements DeprecatedRectorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Rector\TypeDeclaration\Rector\FunctionLike;
|
|||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use Rector\Core\Contract\Rector\DeprecatedRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use RectorPrefix202212\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -16,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @deprecated Moving doc types to type declarations is dangerous. Use specific strict types instead.
|
||||
* This rule will be split info many small ones.
|
||||
*/
|
||||
final class ReturnTypeDeclarationRector extends AbstractRector
|
||||
final class ReturnTypeDeclarationRector extends AbstractRector implements DeprecatedRectorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Rector\TypeDeclaration\Rector\Property;
|
|||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\Core\Contract\Rector\DeprecatedRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use RectorPrefix202212\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -14,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @deprecated This rule move doctypes to strict type declarations and often breaks the code.
|
||||
* Instead use specific rules that handle exact type declarations.
|
||||
*/
|
||||
final class PropertyTypeDeclarationRector extends AbstractRector
|
||||
final class PropertyTypeDeclarationRector extends AbstractRector implements DeprecatedRectorInterface
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
|
|
|
@ -17,12 +17,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '7648780936ffae358b4f79230923ee61dde30e14';
|
||||
public const PACKAGE_VERSION = 'a31ae50227e48b078b9a3e78da55507a23127887';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-12-02 13:55:14';
|
||||
public const RELEASE_DATE = '2022-12-02 15:10:24';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
8
src/Contract/Rector/DeprecatedRectorInterface.php
Normal file
8
src/Contract/Rector/DeprecatedRectorInterface.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Core\Contract\Rector;
|
||||
|
||||
interface DeprecatedRectorInterface
|
||||
{
|
||||
}
|
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 ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3::getLoader();
|
||||
return ComposerAutoloaderInit06dfe1595f78204896e34e12d7ff0fec::getLoader();
|
||||
|
|
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
|
@ -1351,6 +1351,7 @@ return array(
|
|||
'Rector\\Core\\Contract\\Processor\\FileProcessorInterface' => $baseDir . '/src/Contract/Processor/FileProcessorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\AllowEmptyConfigurableRectorInterface' => $baseDir . '/src/Contract/Rector/AllowEmptyConfigurableRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\ConfigurableRectorInterface' => $baseDir . '/src/Contract/Rector/ConfigurableRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\DeprecatedRectorInterface' => $baseDir . '/src/Contract/Rector/DeprecatedRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\NonPhpRectorInterface' => $baseDir . '/src/Contract/Rector/NonPhpRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\PhpRectorInterface' => $baseDir . '/src/Contract/Rector/PhpRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\RectorInterface' => $baseDir . '/src/Contract/Rector/RectorInterface.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 ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3
|
||||
class ComposerAutoloaderInit06dfe1595f78204896e34e12d7ff0fec
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit06dfe1595f78204896e34e12d7ff0fec', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit06dfe1595f78204896e34e12d7ff0fec', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire9a66746bbab502cbaede3783e4f6aad3($fileIdentifier, $file);
|
||||
composerRequire06dfe1595f78204896e34e12d7ff0fec($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit9a66746bbab502cbaede3783e4f6aad3
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire9a66746bbab502cbaede3783e4f6aad3($fileIdentifier, $file)
|
||||
function composerRequire06dfe1595f78204896e34e12d7ff0fec($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
9
vendor/composer/autoload_static.php
vendored
9
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3
|
||||
class ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -1596,6 +1596,7 @@ class ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3
|
|||
'Rector\\Core\\Contract\\Processor\\FileProcessorInterface' => __DIR__ . '/../..' . '/src/Contract/Processor/FileProcessorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\AllowEmptyConfigurableRectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/AllowEmptyConfigurableRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\ConfigurableRectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/ConfigurableRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\DeprecatedRectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/DeprecatedRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\NonPhpRectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/NonPhpRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\PhpRectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/PhpRectorInterface.php',
|
||||
'Rector\\Core\\Contract\\Rector\\RectorInterface' => __DIR__ . '/../..' . '/src/Contract/Rector/RectorInterface.php',
|
||||
|
@ -3022,9 +3023,9 @@ class ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit9a66746bbab502cbaede3783e4f6aad3::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit06dfe1595f78204896e34e12d7ff0fec::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user