From f5416c75385fb5c35d2fff05abb06b0b875db450 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 10 Oct 2026 12:51:38 +0200 Subject: [PATCH 1/3] Use Rector\RuleDoc namespace instead of deprecated symplify/rule-doc-generator-contracts The symplify/rule-doc-generator-contracts package is deprecated. Its classes are inlined in rector-src under the Rector\RuleDoc namespace, so switch rule imports from Symplify\RuleDocGenerator\* to Rector\RuleDoc\*. --- .../ClassMethod/DowngradeParameterTypeWideningRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp72JsonConstRector.php | 4 ++-- .../FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php | 4 ++-- .../FuncCall/DowngradePregUnmatchedAsNullConstantRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStreamIsattyRector.php | 4 ++-- .../FunctionLike/DowngradeObjectTypeDeclarationRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp73JsonConstRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeIsCountableRector.php | 4 ++-- .../FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php | 4 ++-- .../FuncCall/SetCookieOptionsArrayToArgumentsRector.php | 4 ++-- .../Rector/List_/DowngradeListReferenceAssignmentRector.php | 4 ++-- .../Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php | 4 ++-- .../Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php | 4 ++-- .../Rector/Array_/DowngradeArraySpreadRector.php | 4 ++-- .../ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php | 4 ++-- .../ClassMethod/DowngradeContravariantArgumentTypeRector.php | 4 ++-- .../Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php | 4 ++-- .../Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php | 4 ++-- .../DowngradeArrayMergeCallWithoutArgumentsRector.php | 4 ++-- .../FuncCall/DowngradeProcOpenArrayCommandArgRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php | 4 ++-- .../Identical/DowngradeFreadFwriteFalsyToNegationRector.php | 4 ++-- .../DowngradePreviouslyImplementedInterfaceRector.php | 4 ++-- .../Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php | 4 ++-- .../Rector/MethodCall/DowngradeReflectionGetTypeRector.php | 4 ++-- .../Rector/Property/DowngradeTypedPropertyRector.php | 4 ++-- .../ArrayDimFetch/DowngradeDereferenceableOperationRector.php | 4 ++-- .../Rector/Catch_/DowngradeNonCapturingCatchesRector.php | 4 ++-- .../DowngradeClassOnObjectToGetClassRector.php | 4 ++-- .../DowngradeAbstractPrivateMethodInTraitRector.php | 4 ++-- .../DowngradeRecursiveDirectoryIteratorHasChildrenRector.php | 4 ++-- .../ClassMethod/DowngradeStaticTypeDeclarationRector.php | 4 ++-- .../ClassMethod/DowngradeStringReturnTypeOnToStringRector.php | 4 ++-- .../ClassMethod/DowngradeTrailingCommasInParamUseRector.php | 4 ++-- .../RemoveReturnTypeDeclarationFromCloneRector.php | 4 ++-- .../Rector/Class_/DowngradeAttributeToAnnotationRector.php | 4 ++-- .../Rector/Class_/DowngradePropertyPromotionRector.php | 4 ++-- .../Rector/Enum_/DowngradeEnumToConstantListClassRector.php | 4 ++-- .../Rector/Expression/DowngradeMatchToSwitchRector.php | 4 ++-- .../Rector/Expression/DowngradeThrowExprRector.php | 4 ++-- .../Foreach_/DowngradeDomNodeChildNodesForeachRector.php | 4 ++-- .../FuncCall/DowngradeArrayFilterNullableCallbackRector.php | 4 ++-- .../FuncCall/DowngradeNumberFormatNoFourthArgRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrContainsRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrEndsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrStartsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeSubstrFalsyRector.php | 4 ++-- .../FunctionLike/DowngradeMixedTypeDeclarationRector.php | 4 ++-- .../FunctionLike/DowngradeUnionTypeDeclarationRector.php | 4 ++-- .../Instanceof_/DowngradeInstanceofStringableRector.php | 4 ++-- .../DowngradePhp80ResourceReturnToObjectRector.php | 4 ++-- .../Rector/MethodCall/DowngradeNamedArgumentRector.php | 4 ++-- .../DowngradeReflectionClassGetConstantsFilterRector.php | 4 ++-- .../MethodCall/DowngradeReflectionGetAttributesRector.php | 4 ++-- .../DowngradeReflectionPropertyGetDefaultValueRector.php | 4 ++-- .../New_/DowngradeArbitraryExpressionsSupportRector.php | 4 ++-- .../DowngradeNullsafeToTernaryOperatorRector.php | 4 ++-- .../Rector/Property/DowngradeMixedTypeTypedPropertyRector.php | 4 ++-- .../Rector/Property/DowngradeUnionTypeTypedPropertyRector.php | 4 ++-- .../Rector/StaticCall/DowngradePhpTokenRector.php | 4 ++-- .../ClassConst/DowngradeFinalizePublicClassConstantRector.php | 4 ++-- .../ClassMethod/AddReturnTypeWillChangeAttributeRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayIsListRector.php | 4 ++-- .../FuncCall/DowngradeFirstClassCallableSyntaxRector.php | 4 ++-- .../Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php | 4 ++-- .../FunctionLike/DowngradeNeverTypeDeclarationRector.php | 4 ++-- .../Rector/FunctionLike/DowngradeNewInInitializerRector.php | 4 ++-- .../FunctionLike/DowngradePureIntersectionTypeRector.php | 4 ++-- .../DowngradePhp81ResourceReturnToObjectRector.php | 4 ++-- .../Rector/LNumber/DowngradeOctalNumberRector.php | 4 ++-- .../Rector/MethodCall/DowngradeIsEnumRector.php | 4 ++-- .../Rector/Property/DowngradeReadonlyPropertyRector.php | 4 ++-- .../DowngradeSetAccessibleReflectionPropertyRector.php | 4 ++-- .../DowngradeArrowFunctionNeverReturnTypeRector.php | 4 ++-- .../Rector/Class_/DowngradeReadonlyClassRector.php | 4 ++-- .../Rector/Class_/DowngradeUnionIntersectionRector.php | 4 ++-- .../Rector/FuncCall/DowngradeIteratorCountToArrayRector.php | 4 ++-- .../DowngradeStandaloneNullTrueFalseReturnTypeRector.php | 4 ++-- .../DowngradeReflectionMethodHasPrototypeRector.php | 4 ++-- .../Rector/ClassConst/DowngradeTypedClassConstRector.php | 4 ++-- .../ClassConstFetch/DowngradeDynamicClassConstFetchRector.php | 4 ++-- .../Rector/Class_/DowngradeReadonlyAnonymousClassRector.php | 4 ++-- .../Rector/FuncCall/DowngradeJsonValidateRector.php | 4 ++-- .../Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php | 4 ++-- .../Rector/Class_/DowngradeFinalPropertyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAllRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAnyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindKeyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindRector.php | 4 ++-- .../Rector/FuncCall/DowngradeExitNamedArgumentRector.php | 4 ++-- .../Rector/FuncCall/DowngradeRoundingModeEnumRector.php | 4 ++-- .../DowngradeNewMethodCallWithoutParenthesesRector.php | 4 ++-- .../Rector/Class_/DowngradeFinalPropertyPromotionRector.php | 4 ++-- .../Rector/Expression/DowngradeVoidCastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayFirstLastRector.php | 4 ++-- .../StmtsAwareInterface/DowngradePipeOperatorRector.php | 4 ++-- rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php | 4 ++-- 98 files changed, 196 insertions(+), 196 deletions(-) diff --git a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php index c94b49b2..09c83c76 100644 --- a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php +++ b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php @@ -16,9 +16,9 @@ use Rector\DowngradePhp72\PhpDoc\NativeParamToPhpDocDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\ValueObject\CodeSample\ConfiguredCodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\TypeDeclaration\NodeAnalyzer\AutowiredClassMethodOrPropertyAnalyzer; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php index 93fdd976..7620e31d 100644 --- a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php +++ b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php @@ -14,8 +14,8 @@ use Rector\NodeAnalyzer\DefineFuncCallAnalyzer; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php index 01d57c84..0dbb8a40 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php @@ -14,8 +14,8 @@ use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradeJsonDecodeNullAssociativeArgRector\DowngradeJsonDecodeNullAssociativeArgRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php index 3e72ad27..dc790ea1 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php @@ -24,8 +24,8 @@ use Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector\DowngradePregUnmatchedAsNullConstantRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php index 5eeca9e5..cece772a 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php @@ -22,8 +22,8 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://github.com/symfony/polyfill/commit/cc2bf55accd32b989348e2039e8c91cde46aebed diff --git a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php index 76a6de4d..330c32bb 100644 --- a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php +++ b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php @@ -11,8 +11,8 @@ use PHPStan\Type\ObjectWithoutClassType; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector\DowngradeObjectTypeDeclarationRectorTest diff --git a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php index 25b5f5f5..eb12ec15 100644 --- a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php +++ b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php @@ -24,8 +24,8 @@ use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index b37bca51..e31e9ef7 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -30,8 +30,8 @@ use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/array_key_first_last diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php index 538611dd..e1eef949 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Expr\Instanceof_; use PhpParser\Node\Name\FullyQualified; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is-countable diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index bb5454b9..bba819b2 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -12,8 +12,8 @@ use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector\DowngradeTrailingCommasInFunctionCallsRectorTest diff --git a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php index eaa0f47b..dd75c086 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php @@ -13,8 +13,8 @@ use PhpParser\Node\Scalar\String_; use Rector\Exception\ShouldNotHappenException; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector\SetCookieOptionsArrayToArgumentsRectorTest diff --git a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php index dd9fbf2a..1df0a0a1 100644 --- a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php +++ b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php @@ -17,8 +17,8 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Expression; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/list_reference_assignment diff --git a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php index 401bec19..59d8ad96 100644 --- a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php +++ b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php @@ -10,8 +10,8 @@ use Rector\DowngradePhp73\Tokenizer\FollowedByNewlineOnlyMaybeWithSemicolonAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector\DowngradeFlexibleHeredocSyntaxRectorTest diff --git a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php index 89e5637c..341d0112 100644 --- a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php +++ b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php @@ -9,8 +9,8 @@ use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\Unset_\DowngradeTrailingCommasInUnsetRector\DowngradeTrailingCommasInUnsetRectorTest diff --git a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php index ea05942a..307089d7 100644 --- a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php +++ b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php @@ -20,9 +20,9 @@ use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/spread_operator_for_array diff --git a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php index 4f6c99de..50fd64eb 100644 --- a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php +++ b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php @@ -20,8 +20,8 @@ use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/functions.arrow.php diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php index 49d13983..752faa34 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php @@ -16,13 +16,13 @@ use Rector\NodeAnalyzer\ParamAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\ValueObject\MethodName; use ReflectionMethod; use ReflectionNamedType; use ReflectionParameter; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/language.oop5.variance.php#language.oop5.variance.contravariance diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index ff2e481a..33f26961 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -27,11 +27,11 @@ use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType; use Rector\Util\Reflection\PrivatesAccessor; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration74.new-features.php#migration74.new-features.core.type-variance diff --git a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php index 5492d579..0a183838 100644 --- a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php +++ b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Expr\AssignOp\Coalesce as AssignCoalesce; use PhpParser\Node\Expr\BinaryOp\Coalesce; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/null_coalesce_equal_operator diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php index 672bacbe..bb372352 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector\DowngradeArrayMergeCallWithoutArgumentsRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php index af912fed..69cd0911 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeProcOpenArrayCommandArgRector\DowngradeProcOpenArrayCommandArgRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php index 301a20c0..286cd72e 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php @@ -21,8 +21,8 @@ use PhpParser\Node\Scalar\String_; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector\DowngradeStripTagsCallWithArrayRectorTest diff --git a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php index 505e848e..7c0651be 100644 --- a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php +++ b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Expr\FuncCall; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector\DowngradeFreadFwriteFalsyToNegationRectorTest diff --git a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php index 6453fbb0..432a446f 100644 --- a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php +++ b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Stmt\Interface_; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector\DowngradePreviouslyImplementedInterfaceRectorTest diff --git a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php index f2c581e6..659cbc28 100644 --- a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php +++ b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Scalar\Int_; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/numeric_literal_separator diff --git a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php index e53535ae..ebe416e1 100644 --- a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php +++ b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php @@ -14,8 +14,8 @@ use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector\DowngradeReflectionGetTypeRectorTest diff --git a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php index 520b7002..371ab5c2 100644 --- a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php +++ b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php @@ -11,8 +11,8 @@ use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\DowngradeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php index 0878fcd5..1a9bae5e 100644 --- a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php +++ b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Scalar\MagicConst; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks diff --git a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php index 10bfd2f8..6772d282 100644 --- a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php +++ b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php @@ -10,8 +10,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/non-capturing_catches diff --git a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php index d91ba517..fddad664 100644 --- a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php +++ b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassConstFetch\DowngradeClassOnObjectToGetClassRector\DowngradeClassOnObjectToGetClassRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php index 4426faa0..16ea898a 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php @@ -10,8 +10,8 @@ use PHPStan\Reflection\ClassReflection; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeAbstractPrivateMethodInTraitRector\DowngradeAbstractPrivateMethodInTraitRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php index cfee1725..b8975487 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\Class_; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector\DowngradeRecursiveDirectoryIteratorHasChildrenRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index 8c26267b..59788c67 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -11,8 +11,8 @@ use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector\DowngradeStaticTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php index 0b409a69..4208aa7d 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php @@ -12,8 +12,8 @@ use Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\DowngradeStringReturnTypeOnToStringRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index 037855bd..21b763cd 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -13,8 +13,8 @@ use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector\DowngradeTrailingCommasInParamUseRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php index 5966ed1c..b3fd68a0 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php @@ -7,8 +7,8 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassMethod; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://3v4l.org/Wgj19 diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php index 5419164b..f1229947 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php @@ -23,8 +23,8 @@ use Rector\NodeFactory\DoctrineAnnotationFactory; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\ConfiguredCodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php index dd96ee9a..b59dd718 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php @@ -23,9 +23,9 @@ use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Printer\BetterStandardPrinter; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/constructor_promotion diff --git a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php index c6d46994..8312ecbc 100644 --- a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php +++ b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php @@ -24,8 +24,8 @@ use Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer; use Rector\NodeFactory\ClassFromEnumFactory; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Enum_\DowngradeEnumToConstantListClassRector\DowngradeEnumToConstantListClassRectorTest diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php index af41c0ff..e9c1b318 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php @@ -36,8 +36,8 @@ use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/match_expression_v2 diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php index 07c02291..834a2ae8 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php @@ -31,8 +31,8 @@ use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/throw_expression diff --git a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php index 0566418d..7db461ac 100644 --- a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php +++ b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Stmt\Foreach_; use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://github.com/php/php-src/pull/5180 https://bugs.php.net/bug.php?id=79271 diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php index ac510f59..dca8b820 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php @@ -29,8 +29,8 @@ use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php index 12de9cef..e4322220 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Scalar\String_; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use ReflectionFunction; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.number-format.php#refsect1-function.number-format-changelog diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php index 18cb98af..96bd644f 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/str_contains diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php index 40cdad18..f7a84f80 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php @@ -15,8 +15,8 @@ use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php index 6dbd2e19..702c6afb 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php @@ -13,8 +13,8 @@ use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php index 1f421208..28a3f2e3 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php @@ -34,8 +34,8 @@ use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.0/substr-out-of-bounds diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php index 441f87ab..0b99f016 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php @@ -12,8 +12,8 @@ use PHPStan\Type\MixedType; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector\DowngradeMixedTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php index a5f1b0b8..9e57e0e6 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php @@ -12,8 +12,8 @@ use PhpParser\Node\UnionType; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector\DowngradeUnionTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php index 5cfd892f..12e4d7f1 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/stringable diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php index 5c6b2934..8b6bb3d2 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Expr\Instanceof_; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index ea6d519b..6045217a 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -17,8 +17,8 @@ use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\DowngradeNamedArgumentRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php index 4b6b3dda..e4b05554 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php @@ -25,8 +25,8 @@ use Rector\NodeCollector\BinaryOpConditionsCollector; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector\DowngradeReflectionClassGetConstantsFilterRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php index d9f08083..903de586 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php @@ -14,8 +14,8 @@ use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector\DowngradeReflectionGetAttributesRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php index b7b35f76..3afbcb2e 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Expr\MethodCall; use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector\DowngradeReflectionPropertyGetDefaultValueRectorTest diff --git a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php index a69a2981..328c836d 100644 --- a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php +++ b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php @@ -20,8 +20,8 @@ use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks#arbitrary_expression_support_for_new_and_instanceof diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index 3e4428bd..a3f818dd 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -14,8 +14,8 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\DowngradeNullsafeToTernaryOperatorRectorTest diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php index d7fca7ed..4926a7db 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Stmt\Property; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeMixedTypeTypedPropertyRector\DowngradeMixedTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php index 05e718b4..c82f745a 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\UnionType; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\DowngradeUnionTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php index d6580c33..6a1032aa 100644 --- a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php +++ b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php @@ -18,8 +18,8 @@ use PHPStan\Type\ThisType; use PHPStan\Type\Type; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector\DowngradePhpTokenRectorTest diff --git a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php index a57c62bd..34ff7e7f 100644 --- a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php +++ b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\ClassConst; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/final-class-const diff --git a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php index ac8cf356..4e2794b5 100644 --- a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php +++ b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php @@ -12,8 +12,8 @@ use PHPStan\Reflection\ReflectionProvider; use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://php.watch/versions/8.1/ReturnTypeWillChange diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php index 81fcb632..8cab16f8 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php @@ -21,8 +21,8 @@ use Rector\PhpParser\Enum\NodeGroup; use Rector\PhpParser\Parser\InlineCodeParser; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is_list diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php index e33471e5..5b3060cc 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php @@ -18,8 +18,8 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/first_class_callable_syntax diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php index 66bbce5f..a2ed3f60 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php @@ -18,8 +18,8 @@ use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHash\DowngradeHashAlgorithmXxHashRectorTest diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php index 4c0203f9..1c3bb77d 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php @@ -12,8 +12,8 @@ use PHPStan\Type\NeverType; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/noreturn_type diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php index d20ae963..899532d0 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php @@ -31,9 +31,9 @@ use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/new_in_initializers diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php index 42295afe..cdb107b7 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php @@ -12,8 +12,8 @@ use PhpParser\Node\Stmt\Function_; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/pure-intersection-types diff --git a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php index 1bd43468..aa7ee088 100644 --- a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Expr\Instanceof_; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.resource2object diff --git a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php index 7b3ddfbb..204350f7 100644 --- a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php +++ b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Scalar\Int_; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/explicit-octal-notation diff --git a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php index 33113a54..ed7a9787 100644 --- a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php +++ b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php @@ -11,8 +11,8 @@ use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\MethodCall\DowngradeIsEnumRector\DowngradeIsEnumRectorTest diff --git a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php index 766dd020..1dab9279 100644 --- a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php +++ b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php @@ -14,9 +14,9 @@ use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/readonly_properties_v2 diff --git a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php index e518efe8..b8519403 100644 --- a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php +++ b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php @@ -24,8 +24,8 @@ use Rector\PhpParser\Enum\NodeGroup; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://phpbackend.com/blog/post/php-8-1-accessing-private-protected-properties-methods-via-reflection-api-is-now-allowed-without-calling-setAccessible diff --git a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php index 83de98a8..e7dcaf34 100644 --- a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php @@ -9,8 +9,8 @@ use PHPStan\Type\NeverType; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * PHP 8.1 accepts the "never" return type everywhere except on arrow functions, where the implicit diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php index ff521b40..a3af6ed7 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\Class_; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/readonly_classes diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php index 1898352e..5779899b 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php @@ -17,8 +17,8 @@ use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php index e4044dbb..3472a090 100644 --- a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php +++ b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php @@ -14,8 +14,8 @@ use PHPStan\Type\TypeCombinator; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php index 0d3f7571..0f2f203f 100644 --- a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php @@ -23,9 +23,9 @@ use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\AstResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/null-false-standalone-types diff --git a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php index 19e6cb54..74fe055a 100644 --- a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php +++ b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php @@ -23,8 +23,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp82\Rector\MethodCall\DowngradeReflectionMethodHasPrototypeRector\DowngradeReflectionMethodHasPrototypeRectorTest diff --git a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php index dde12520..8e5f9d43 100644 --- a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php +++ b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\ClassConst; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/typed_class_constants diff --git a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php index cee77418..cd7cbd1f 100644 --- a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php +++ b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/dynamic_class_constant_fetch diff --git a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php index c3331579..63b115e1 100644 --- a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php +++ b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\Class_; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://www.php.net/manual/en/migration83.new-features.php#migration83.new-features.core.readonly-modifier-improvements diff --git a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php index a75e064d..99d050e0 100644 --- a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php +++ b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php @@ -23,8 +23,8 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/json_validate diff --git a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php index be3ab9c4..f01e45f8 100644 --- a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php +++ b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php @@ -18,8 +18,8 @@ use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/deprecated_attribute diff --git a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php index f595c879..ccb60156 100644 --- a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php +++ b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php @@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/property-hooks#final_properties diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php index d3c3166d..9f7a49e9 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php @@ -21,8 +21,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php index fc2e2d06..eee7cdb4 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php @@ -20,8 +20,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php index 41251574..f8ef4002 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php @@ -20,8 +20,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php index 12410c67..356fd482 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php @@ -20,8 +20,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php index 198523b7..d05ff24c 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Identifier; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/exit-as-function diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php index 0f0c3088..f48b8130 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php @@ -13,8 +13,8 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name\FullyQualified; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum diff --git a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php index e7a58e42..6a2de6cd 100644 --- a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php +++ b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/new_without_parentheses diff --git a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php index 33dc4f9e..bf78ef93 100644 --- a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php +++ b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php @@ -14,10 +14,10 @@ use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; use Rector\ValueObject\Visibility; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/final_promotion diff --git a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php index 686e55ec..fe313bf4 100644 --- a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php +++ b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php @@ -12,8 +12,8 @@ use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/marking_return_value_as_important diff --git a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php index 949a4e36..d0679dc0 100644 --- a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php +++ b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\FuncCall; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://php.watch/versions/8.5/array_first-array_last diff --git a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php index 2362490b..32d11571 100644 --- a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php +++ b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php @@ -18,8 +18,8 @@ use Rector\NodeFactory\NamedVariableFactory; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp85\Rector\StmtsAwareInterface\DowngradePipeOperatorRector\DowngradePipeOperatorRectorTest diff --git a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php index ce35baac..9b4c7351 100644 --- a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php +++ b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use Rector\Rector\AbstractRector; -use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; -use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; +use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; +use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/clamp_v2 From 04efee86228bc6b11cbedf4904a1beed42072e23 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 10 Oct 2026 14:57:19 +0200 Subject: [PATCH 2/3] Use Rector\Doc namespace over Rector\RuleDoc\ValueObject --- .../ClassMethod/DowngradeParameterTypeWideningRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp72JsonConstRector.php | 4 ++-- .../DowngradeJsonDecodeNullAssociativeArgRector.php | 4 ++-- .../DowngradePregUnmatchedAsNullConstantRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStreamIsattyRector.php | 4 ++-- .../FunctionLike/DowngradeObjectTypeDeclarationRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp73JsonConstRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeIsCountableRector.php | 4 ++-- .../DowngradeTrailingCommasInFunctionCallsRector.php | 4 ++-- .../FuncCall/SetCookieOptionsArrayToArgumentsRector.php | 4 ++-- .../List_/DowngradeListReferenceAssignmentRector.php | 4 ++-- .../String_/DowngradeFlexibleHeredocSyntaxRector.php | 7 ++++--- .../Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php | 4 ++-- .../Rector/Array_/DowngradeArraySpreadRector.php | 4 ++-- .../ArrowFunctionToAnonymousFunctionRector.php | 4 ++-- .../DowngradeContravariantArgumentTypeRector.php | 4 ++-- .../ClassMethod/DowngradeCovariantReturnTypeRector.php | 4 ++-- .../Coalesce/DowngradeNullCoalescingOperatorRector.php | 4 ++-- .../DowngradeArrayMergeCallWithoutArgumentsRector.php | 4 ++-- .../FuncCall/DowngradeProcOpenArrayCommandArgRector.php | 4 ++-- .../FuncCall/DowngradeStripTagsCallWithArrayRector.php | 4 ++-- .../DowngradeFreadFwriteFalsyToNegationRector.php | 4 ++-- .../DowngradePreviouslyImplementedInterfaceRector.php | 4 ++-- .../LNumber/DowngradeNumericLiteralSeparatorRector.php | 4 ++-- .../Rector/MethodCall/DowngradeReflectionGetTypeRector.php | 4 ++-- .../Rector/Property/DowngradeTypedPropertyRector.php | 4 ++-- .../DowngradeDereferenceableOperationRector.php | 7 ++++--- .../Rector/Catch_/DowngradeNonCapturingCatchesRector.php | 4 ++-- .../DowngradeClassOnObjectToGetClassRector.php | 4 ++-- .../DowngradeAbstractPrivateMethodInTraitRector.php | 4 ++-- ...owngradeRecursiveDirectoryIteratorHasChildrenRector.php | 4 ++-- .../ClassMethod/DowngradeStaticTypeDeclarationRector.php | 4 ++-- .../DowngradeStringReturnTypeOnToStringRector.php | 4 ++-- .../DowngradeTrailingCommasInParamUseRector.php | 4 ++-- .../RemoveReturnTypeDeclarationFromCloneRector.php | 4 ++-- .../Rector/Class_/DowngradeAttributeToAnnotationRector.php | 7 ++++--- .../Rector/Class_/DowngradePropertyPromotionRector.php | 4 ++-- .../Enum_/DowngradeEnumToConstantListClassRector.php | 4 ++-- .../Rector/Expression/DowngradeMatchToSwitchRector.php | 4 ++-- .../Rector/Expression/DowngradeThrowExprRector.php | 4 ++-- .../Foreach_/DowngradeDomNodeChildNodesForeachRector.php | 4 ++-- .../DowngradeArrayFilterNullableCallbackRector.php | 4 ++-- .../FuncCall/DowngradeNumberFormatNoFourthArgRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrContainsRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrEndsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrStartsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeSubstrFalsyRector.php | 4 ++-- .../FunctionLike/DowngradeMixedTypeDeclarationRector.php | 4 ++-- .../FunctionLike/DowngradeUnionTypeDeclarationRector.php | 4 ++-- .../Instanceof_/DowngradeInstanceofStringableRector.php | 4 ++-- .../DowngradePhp80ResourceReturnToObjectRector.php | 4 ++-- .../Rector/MethodCall/DowngradeNamedArgumentRector.php | 4 ++-- .../DowngradeReflectionClassGetConstantsFilterRector.php | 4 ++-- .../MethodCall/DowngradeReflectionGetAttributesRector.php | 4 ++-- .../DowngradeReflectionPropertyGetDefaultValueRector.php | 4 ++-- .../New_/DowngradeArbitraryExpressionsSupportRector.php | 7 ++++--- .../DowngradeNullsafeToTernaryOperatorRector.php | 7 ++++--- .../Property/DowngradeMixedTypeTypedPropertyRector.php | 4 ++-- .../Property/DowngradeUnionTypeTypedPropertyRector.php | 4 ++-- .../Rector/StaticCall/DowngradePhpTokenRector.php | 4 ++-- .../DowngradeFinalizePublicClassConstantRector.php | 4 ++-- .../ClassMethod/AddReturnTypeWillChangeAttributeRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayIsListRector.php | 4 ++-- .../FuncCall/DowngradeFirstClassCallableSyntaxRector.php | 4 ++-- .../Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php | 4 ++-- .../FunctionLike/DowngradeNeverTypeDeclarationRector.php | 4 ++-- .../FunctionLike/DowngradeNewInInitializerRector.php | 4 ++-- .../FunctionLike/DowngradePureIntersectionTypeRector.php | 4 ++-- .../DowngradePhp81ResourceReturnToObjectRector.php | 4 ++-- .../Rector/LNumber/DowngradeOctalNumberRector.php | 4 ++-- .../Rector/MethodCall/DowngradeIsEnumRector.php | 4 ++-- .../Rector/Property/DowngradeReadonlyPropertyRector.php | 4 ++-- .../DowngradeSetAccessibleReflectionPropertyRector.php | 4 ++-- .../DowngradeArrowFunctionNeverReturnTypeRector.php | 4 ++-- .../Rector/Class_/DowngradeReadonlyClassRector.php | 4 ++-- .../Rector/Class_/DowngradeUnionIntersectionRector.php | 4 ++-- .../FuncCall/DowngradeIteratorCountToArrayRector.php | 4 ++-- .../DowngradeStandaloneNullTrueFalseReturnTypeRector.php | 4 ++-- .../DowngradeReflectionMethodHasPrototypeRector.php | 4 ++-- .../Rector/ClassConst/DowngradeTypedClassConstRector.php | 4 ++-- .../DowngradeDynamicClassConstFetchRector.php | 4 ++-- .../Class_/DowngradeReadonlyAnonymousClassRector.php | 4 ++-- .../Rector/FuncCall/DowngradeJsonValidateRector.php | 4 ++-- .../ClassMethod/DowngradeDeprecatedAttributeRector.php | 4 ++-- .../Rector/Class_/DowngradeFinalPropertyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAllRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAnyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindKeyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindRector.php | 4 ++-- .../Rector/FuncCall/DowngradeExitNamedArgumentRector.php | 4 ++-- .../Rector/FuncCall/DowngradeRoundingModeEnumRector.php | 4 ++-- .../DowngradeNewMethodCallWithoutParenthesesRector.php | 7 ++++--- .../Class_/DowngradeFinalPropertyPromotionRector.php | 4 ++-- .../Rector/Expression/DowngradeVoidCastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayFirstLastRector.php | 4 ++-- .../StmtsAwareInterface/DowngradePipeOperatorRector.php | 4 ++-- .../Rector/FuncCall/DowngradeClampRector.php | 4 ++-- 98 files changed, 208 insertions(+), 202 deletions(-) diff --git a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php index 09c83c76..679a8459 100644 --- a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php +++ b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php @@ -10,14 +10,14 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use Rector\Contract\Rector\ConfigurableRectorInterface; +use Rector\Doc\CodeSample\ConfiguredCodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeAnalyzer\BuiltInMethodAnalyzer; use Rector\DowngradePhp72\NodeAnalyzer\OverrideFromAnonymousClassMethodAnalyzer; use Rector\DowngradePhp72\NodeAnalyzer\SealedClassAnalyzer; use Rector\DowngradePhp72\PhpDoc\NativeParamToPhpDocDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\ConfiguredCodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\TypeDeclaration\NodeAnalyzer\AutowiredClassMethodOrPropertyAnalyzer; use Webmozart\Assert\Assert; diff --git a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php index 7620e31d..87ec98e9 100644 --- a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php +++ b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php @@ -9,13 +9,13 @@ use PhpParser\Node\Expr\BinaryOp\BitwiseOr; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Stmt\If_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeManipulator\JsonConstCleaner; use Rector\Enum\JsonConstant; use Rector\NodeAnalyzer\DefineFuncCallAnalyzer; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php index 0dbb8a40..d2a04253 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php @@ -11,11 +11,11 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Ternary; use PHPStan\Type\BooleanType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradeJsonDecodeNullAssociativeArgRector\DowngradeJsonDecodeNullAssociativeArgRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php index dc790ea1..cbe166fa 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php @@ -20,12 +20,12 @@ use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeAnalyzer\RegexFuncAnalyzer; use Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector\DowngradePregUnmatchedAsNullConstantRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php index cece772a..fd702a48 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php @@ -14,6 +14,8 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; @@ -22,8 +24,6 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://github.com/symfony/polyfill/commit/cc2bf55accd32b989348e2039e8c91cde46aebed diff --git a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php index 330c32bb..9f892a6f 100644 --- a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php +++ b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\ObjectWithoutClassType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector\DowngradeObjectTypeDeclarationRectorTest diff --git a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php index eb12ec15..e8ea41e6 100644 --- a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php +++ b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php @@ -18,14 +18,14 @@ use PhpParser\Node\Name\FullyQualified as NameFullyQualified; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeManipulator\JsonConstCleaner; use Rector\Enum\JsonConstant; use Rector\NodeAnalyzer\DefineFuncCallAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index e31e9ef7..32c3f5ac 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -25,13 +25,13 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/array_key_first_last diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php index e1eef949..48ce923e 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Instanceof_; use PhpParser\Node\Name\FullyQualified; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is-countable diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index bba819b2..c55d942b 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; use PhpParser\Node\Expr\StaticCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector\DowngradeTrailingCommasInFunctionCallsRectorTest diff --git a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php index dd75c086..8ba7afbb 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php @@ -11,10 +11,10 @@ use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector\SetCookieOptionsArrayToArgumentsRectorTest diff --git a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php index 1df0a0a1..11432bfd 100644 --- a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php +++ b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php @@ -16,9 +16,9 @@ use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Expression; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/list_reference_assignment diff --git a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php index 59d8ad96..8cf93ae5 100644 --- a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php +++ b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php @@ -7,11 +7,11 @@ use PhpParser\Node; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByNewlineOnlyMaybeWithSemicolonAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector\DowngradeFlexibleHeredocSyntaxRectorTest @@ -83,7 +83,8 @@ public function refactor(Node $node): ?Node $node->setAttribute(AttributeKey::DOC_INDENTATION, '__REMOVED__'); $node->setAttribute(AttributeKey::ORIGINAL_NODE, null); - $tokens = $this->getFile()->getOldTokens(); + $tokens = $this->getFile() + ->getOldTokens(); if (isset($tokens[$node->getEndTokenPos()], $tokens[$node->getEndTokenPos() + 1])) { $tokens[$node->getEndTokenPos() + 1]->text = "\n" . $tokens[$node->getEndTokenPos() + 1]->text; } diff --git a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php index 341d0112..753bc58c 100644 --- a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php +++ b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php @@ -6,11 +6,11 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Unset_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\Unset_\DowngradeTrailingCommasInUnsetRector\DowngradeTrailingCommasInUnsetRectorTest diff --git a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php index 307089d7..af735c02 100644 --- a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php +++ b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php @@ -14,14 +14,14 @@ use PhpParser\Node\Stmt\ClassLike; use PHPStan\Analyser\MutatingScope; use PHPStan\Type\Type; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeAnalyzer\ArraySpreadAnalyzer; use Rector\DowngradePhp81\NodeFactory\ArrayMergeFromArraySpreadFactory; use Rector\PhpParser\AstResolver; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType; /** diff --git a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php index 50fd64eb..aeb5d888 100644 --- a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php +++ b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php @@ -16,12 +16,12 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/functions.arrow.php diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php index 752faa34..8bcdc6c4 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php @@ -13,11 +13,11 @@ use PHPStan\Reflection\ClassReflection; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ParamAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\ValueObject\MethodName; use ReflectionMethod; diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index 33f26961..44467a69 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -23,12 +23,12 @@ use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\DeadCode\PhpDoc\TagRemover\ReturnTagRemover; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType; use Rector\Util\Reflection\PrivatesAccessor; diff --git a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php index 0a183838..7e5a18ab 100644 --- a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php +++ b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\AssignOp\Coalesce as AssignCoalesce; use PhpParser\Node\Expr\BinaryOp\Coalesce; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/null_coalesce_equal_operator diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php index bb372352..d92cde7d 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector\DowngradeArrayMergeCallWithoutArgumentsRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php index 69cd0911..a9f7c789 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeProcOpenArrayCommandArgRector\DowngradeProcOpenArrayCommandArgRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php index 286cd72e..a5210d0c 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php @@ -19,10 +19,10 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector\DowngradeStripTagsCallWithArrayRectorTest diff --git a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php index 7c0651be..4845dd9f 100644 --- a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php +++ b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector\DowngradeFreadFwriteFalsyToNegationRectorTest diff --git a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php index 432a446f..df15eaae 100644 --- a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php +++ b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Interface_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector\DowngradePreviouslyImplementedInterfaceRectorTest diff --git a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php index 659cbc28..b3e984fe 100644 --- a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php +++ b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Int_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/numeric_literal_separator diff --git a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php index ebe416e1..350a0878 100644 --- a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php +++ b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector\DowngradeReflectionGetTypeRectorTest diff --git a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php index 371ab5c2..98d27e0c 100644 --- a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php +++ b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php @@ -8,11 +8,11 @@ use PhpParser\Node\Expr; use PhpParser\Node\NullableType; use PhpParser\Node\Stmt\Property; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\DowngradeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php index 1a9bae5e..01d152a0 100644 --- a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php +++ b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\MagicConst; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks @@ -89,7 +89,8 @@ private function hasParentheses(ArrayDimFetch $arrayDimFetch): bool } assert($arrayDimFetch->dim instanceof Expr); // already checked in shouldSkip() - $oldTokens = $this->getFile()->getOldTokens(); + $oldTokens = $this->getFile() + ->getOldTokens(); $varEndTokenPos = $arrayDimFetch->var->getEndTokenPos(); $dimStartTokenPos = $arrayDimFetch->dim->getStartTokenPos(); diff --git a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php index 6772d282..4b71eceb 100644 --- a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php +++ b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php @@ -7,11 +7,11 @@ use PhpParser\Node; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Catch_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/non-capturing_catches diff --git a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php index fddad664..36efe191 100644 --- a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php +++ b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassConstFetch\DowngradeClassOnObjectToGetClassRector\DowngradeClassOnObjectToGetClassRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php index 16ea898a..37da6d9e 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php @@ -8,10 +8,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeAbstractPrivateMethodInTraitRector\DowngradeAbstractPrivateMethodInTraitRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php index b8975487..6cab9711 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector\DowngradeRecursiveDirectoryIteratorHasChildrenRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index 59788c67..08f61c23 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -8,11 +8,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use PHPStan\Type\StaticType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector\DowngradeStaticTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php index 4208aa7d..c5816b4d 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use PHPStan\Type\MixedType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\DowngradeStringReturnTypeOnToStringRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index 21b763cd..87449d1d 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -10,11 +10,11 @@ use PhpParser\Node\Param; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector\DowngradeTrailingCommasInParamUseRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php index b3fd68a0..ed5828c6 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php @@ -6,9 +6,9 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassMethod; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://3v4l.org/Wgj19 diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php index f1229947..9d4caaed 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php @@ -19,12 +19,12 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\Contract\Rector\ConfigurableRectorInterface; +use Rector\Doc\CodeSample\ConfiguredCodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation; use Rector\NodeFactory\DoctrineAnnotationFactory; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\ConfiguredCodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** @@ -113,7 +113,8 @@ public function refactor(Node $node): ?Node $this->isDowngraded = false; $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); - $oldTokens = $this->getFile()->getOldTokens(); + $oldTokens = $this->getFile() + ->getOldTokens(); foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $key => $attribute) { diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php index b59dd718..490a4904 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php @@ -19,12 +19,12 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Printer\BetterStandardPrinter; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php index 8312ecbc..3d4ef0f3 100644 --- a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php +++ b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php @@ -21,11 +21,11 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer; use Rector\NodeFactory\ClassFromEnumFactory; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Enum_\DowngradeEnumToConstantListClassRector\DowngradeEnumToConstantListClassRectorTest diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php index e9c1b318..69c01215 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php @@ -31,13 +31,13 @@ use PhpParser\Node\Stmt\Switch_; use PhpParser\NodeVisitor; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/match_expression_v2 diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php index 834a2ae8..55978943 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php @@ -25,14 +25,14 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\CoalesceAnalyzer; use Rector\NodeFactory\NamedVariableFactory; use Rector\NodeManipulator\BinaryOpManipulator; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/throw_expression diff --git a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php index 7db461ac..52a1a6cd 100644 --- a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php +++ b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Stmt\Foreach_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://github.com/php/php-src/pull/5180 https://bugs.php.net/bug.php?id=79271 diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php index dca8b820..5b337cd7 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php @@ -26,11 +26,11 @@ use PHPStan\Type\ClosureType; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\StringType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php index e4322220..47c96dfe 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php @@ -8,10 +8,10 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use ReflectionFunction; /** diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php index 96bd644f..6aae3ac0 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/str_contains diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php index f7a84f80..6365b4b3 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php @@ -14,9 +14,9 @@ use PhpParser\Node\Expr\UnaryMinus; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php index 702c6afb..0db89585 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php @@ -12,9 +12,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php index 28a3f2e3..5ed8ccbb 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php @@ -29,13 +29,13 @@ use PHPStan\Reflection\FunctionReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Type\Constant\ConstantIntegerType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\PHPStan\ParametersAcceptorSelectorVariantsWrapper; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.0/substr-out-of-bounds diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php index 0b99f016..eb66eb4b 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\MixedType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector\DowngradeMixedTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php index 9e57e0e6..cadea5db 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\UnionType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector\DowngradeUnionTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php index 12e4d7f1..97d41859 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\Instanceof_; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/stringable diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php index 8b6bb3d2..0dd44ce1 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Instanceof_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index 6045217a..70ee5ed3 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -13,12 +13,12 @@ use PHPStan\Reflection\FunctionReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Type\MixedType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\NodeAnalyzer\UnnamedArgumentResolver; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\DowngradeNamedArgumentRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php index e4b05554..ee3adeb5 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php @@ -21,12 +21,12 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeCollector\BinaryOpConditionsCollector; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector\DowngradeReflectionClassGetConstantsFilterRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php index 903de586..e15a0b44 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector\DowngradeReflectionGetAttributesRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php index 3afbcb2e..76e050f1 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\BinaryOp\Coalesce; use PhpParser\Node\Expr\MethodCall; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector\DowngradeReflectionPropertyGetDefaultValueRectorTest diff --git a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php index 328c836d..a7439f41 100644 --- a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php +++ b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php @@ -16,12 +16,12 @@ use PhpParser\Node\Expr\StaticPropertyFetch; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeFactory\NamedVariableFactory; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks#arbitrary_expression_support_for_new_and_instanceof @@ -102,7 +102,8 @@ private function isAssign(Expr $expr): bool private function isBetweenParentheses(Node $node): bool { - $oldTokens = $this->getFile()->getOldTokens(); + $oldTokens = $this->getFile() + ->getOldTokens(); $previousTokenPos = $node->getStartTokenPos() - 1; while ($previousTokenPos >= 0) { diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index a3f818dd..9fba5ff2 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\DowngradeNullsafeToTernaryOperatorRectorTest @@ -65,7 +65,8 @@ public function refactor(Node $node): null|Ternary|Expression // across files // due to run on parallel $this->counter = 0; - $currentFile = $this->getFile()->getFilePath(); + $currentFile = $this->getFile() + ->getFilePath(); } if ($node instanceof Expression) { diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php index 4926a7db..b32e86df 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt\Property; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeMixedTypeTypedPropertyRector\DowngradeMixedTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php index c82f745a..72dc5781 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Property; use PhpParser\Node\UnionType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\DowngradeUnionTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php index 6a1032aa..19721f21 100644 --- a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php +++ b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php @@ -17,9 +17,9 @@ use PHPStan\Type\ObjectType; use PHPStan\Type\ThisType; use PHPStan\Type\Type; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector\DowngradePhpTokenRectorTest diff --git a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php index 34ff7e7f..b4346d9c 100644 --- a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php +++ b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/final-class-const diff --git a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php index 4e2794b5..13d3d12c 100644 --- a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php +++ b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Class_; use PHPStan\Reflection\ReflectionProvider; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://php.watch/versions/8.1/ReturnTypeWillChange diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php index 8cab16f8..e3b83c3c 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php @@ -15,14 +15,14 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Enum\NodeGroup; use Rector\PhpParser\Parser\InlineCodeParser; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is_list diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php index 5b3060cc..087dc034 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php @@ -17,9 +17,9 @@ use PhpParser\Node\Name; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/first_class_callable_syntax diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php index a2ed3f60..1dd77cec 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php @@ -13,13 +13,13 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\If_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHash\DowngradeHashAlgorithmXxHashRectorTest diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php index 1c3bb77d..5ed59917 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\NeverType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/noreturn_type diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php index 899532d0..536d52f9 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php @@ -27,12 +27,12 @@ use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Return_; use PhpParser\Node\UnionType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php index cdb107b7..4a9c092e 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\IntersectionType; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/pure-intersection-types diff --git a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php index aa7ee088..517d9ada 100644 --- a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php @@ -8,10 +8,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Instanceof_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.resource2object diff --git a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php index 204350f7..42140f3c 100644 --- a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php +++ b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Scalar\Int_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/explicit-octal-notation diff --git a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php index ed7a9787..51c2970f 100644 --- a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php +++ b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\MethodCall\DowngradeIsEnumRector\DowngradeIsEnumRectorTest diff --git a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php index 1dab9279..dac51c70 100644 --- a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php +++ b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php @@ -12,10 +12,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php index b8519403..7ae33b67 100644 --- a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php +++ b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php @@ -20,12 +20,12 @@ use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PhpParser\Enum\NodeGroup; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://phpbackend.com/blog/post/php-8-1-accessing-private-protected-properties-methods-via-reflection-api-is-now-allowed-without-calling-setAccessible diff --git a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php index e7dcaf34..c634300c 100644 --- a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\ArrowFunction; use PHPStan\Type\NeverType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * PHP 8.1 accepts the "never" return type everywhere except on arrow functions, where the implicit diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php index a3af6ed7..e4b5d860 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/readonly_classes diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php index 5779899b..19a88f09 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php @@ -14,11 +14,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\UnionType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php index 3472a090..84e6dc90 100644 --- a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php +++ b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php @@ -12,10 +12,10 @@ use PhpParser\Node\Name\FullyQualified; use PHPStan\Type\Type; use PHPStan\Type\TypeCombinator; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php index 0f2f203f..b041820b 100644 --- a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php @@ -20,11 +20,11 @@ use PHPStan\Type\UnionType as PHPStanUnionType; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\AstResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; /** diff --git a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php index 74fe055a..90d1268f 100644 --- a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php +++ b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php @@ -20,11 +20,11 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\TryCatch; use PHPStan\Type\ObjectType; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp82\Rector\MethodCall\DowngradeReflectionMethodHasPrototypeRector\DowngradeReflectionMethodHasPrototypeRectorTest diff --git a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php index 8e5f9d43..d5f2b257 100644 --- a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php +++ b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/typed_class_constants diff --git a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php index cd7cbd1f..92dfb4a2 100644 --- a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php +++ b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/dynamic_class_constant_fetch diff --git a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php index 63b115e1..d4fa0f4b 100644 --- a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php +++ b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://www.php.net/manual/en/migration83.new-features.php#migration83.new-features.core.readonly-modifier-improvements diff --git a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php index 99d050e0..b6ff1f6b 100644 --- a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php +++ b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php @@ -15,6 +15,8 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; @@ -23,8 +25,6 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/json_validate diff --git a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php index f01e45f8..58923535 100644 --- a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php +++ b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php @@ -16,10 +16,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/deprecated_attribute diff --git a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php index ccb60156..7b81d2f2 100644 --- a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php +++ b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php @@ -13,9 +13,9 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/property-hooks#final_properties diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php index 9f7a49e9..094a667b 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php @@ -18,11 +18,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php index eee7cdb4..8b8474ad 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php index f8ef4002..d03803ca 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php index 356fd482..2b944575 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php index d05ff24c..a67e6f6b 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Identifier; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/exit-as-function diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php index f48b8130..fe277f93 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php @@ -12,9 +12,9 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; use PhpParser\Node\Name\FullyQualified; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum diff --git a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php index 6a2de6cd..e67223d8 100644 --- a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php +++ b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/new_without_parentheses @@ -53,7 +53,8 @@ public function refactor(Node $node): ?Node return null; } - $oldTokens = $this->getFile()->getOldTokens(); + $oldTokens = $this->getFile() + ->getOldTokens(); $startTokenPos = $node->getStartTokenPos(); $endTokenPos = $node->getEndTokenPos(); diff --git a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php index bf78ef93..790f6692 100644 --- a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php +++ b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php @@ -12,10 +12,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; use Rector\ValueObject\MethodName; use Rector\ValueObject\Visibility; diff --git a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php index fe313bf4..e7244f8c 100644 --- a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php +++ b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Expr\Cast\Void_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/marking_return_value_as_important diff --git a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php index d0679dc0..dc0bf56a 100644 --- a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php +++ b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\FuncCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://php.watch/versions/8.5/array_first-array_last diff --git a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php index 32d11571..09cd2248 100644 --- a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php +++ b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php @@ -15,11 +15,11 @@ use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\NodeFactory\NamedVariableFactory; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp85\Rector\StmtsAwareInterface\DowngradePipeOperatorRector\DowngradePipeOperatorRectorTest diff --git a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php index 9b4c7351..3f05788e 100644 --- a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php +++ b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; +use Rector\Doc\CodeSample\CodeSample; +use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; -use Rector\RuleDoc\ValueObject\CodeSample\CodeSample; -use Rector\RuleDoc\ValueObject\RuleDefinition; /** * @see https://wiki.php.net/rfc/clamp_v2 From 7e7dedc783ec1c5f76fea2ee2530e1d697f7bd0d Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 10 Oct 2026 15:03:28 +0200 Subject: [PATCH 3/3] Rename Rector\Doc back to Rector\RuleDoc namespace --- .../ClassMethod/DowngradeParameterTypeWideningRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp72JsonConstRector.php | 4 ++-- .../FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php | 4 ++-- .../FuncCall/DowngradePregUnmatchedAsNullConstantRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStreamIsattyRector.php | 4 ++-- .../FunctionLike/DowngradeObjectTypeDeclarationRector.php | 4 ++-- .../Rector/ConstFetch/DowngradePhp73JsonConstRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeIsCountableRector.php | 4 ++-- .../FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php | 4 ++-- .../FuncCall/SetCookieOptionsArrayToArgumentsRector.php | 4 ++-- .../Rector/List_/DowngradeListReferenceAssignmentRector.php | 4 ++-- .../Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php | 4 ++-- .../Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php | 4 ++-- .../Rector/Array_/DowngradeArraySpreadRector.php | 4 ++-- .../ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php | 4 ++-- .../ClassMethod/DowngradeContravariantArgumentTypeRector.php | 4 ++-- .../Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php | 4 ++-- .../Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php | 4 ++-- .../DowngradeArrayMergeCallWithoutArgumentsRector.php | 4 ++-- .../FuncCall/DowngradeProcOpenArrayCommandArgRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php | 4 ++-- .../Identical/DowngradeFreadFwriteFalsyToNegationRector.php | 4 ++-- .../DowngradePreviouslyImplementedInterfaceRector.php | 4 ++-- .../Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php | 4 ++-- .../Rector/MethodCall/DowngradeReflectionGetTypeRector.php | 4 ++-- .../Rector/Property/DowngradeTypedPropertyRector.php | 4 ++-- .../ArrayDimFetch/DowngradeDereferenceableOperationRector.php | 4 ++-- .../Rector/Catch_/DowngradeNonCapturingCatchesRector.php | 4 ++-- .../DowngradeClassOnObjectToGetClassRector.php | 4 ++-- .../DowngradeAbstractPrivateMethodInTraitRector.php | 4 ++-- .../DowngradeRecursiveDirectoryIteratorHasChildrenRector.php | 4 ++-- .../ClassMethod/DowngradeStaticTypeDeclarationRector.php | 4 ++-- .../ClassMethod/DowngradeStringReturnTypeOnToStringRector.php | 4 ++-- .../ClassMethod/DowngradeTrailingCommasInParamUseRector.php | 4 ++-- .../RemoveReturnTypeDeclarationFromCloneRector.php | 4 ++-- .../Rector/Class_/DowngradeAttributeToAnnotationRector.php | 4 ++-- .../Rector/Class_/DowngradePropertyPromotionRector.php | 4 ++-- .../Rector/Enum_/DowngradeEnumToConstantListClassRector.php | 4 ++-- .../Rector/Expression/DowngradeMatchToSwitchRector.php | 4 ++-- .../Rector/Expression/DowngradeThrowExprRector.php | 4 ++-- .../Foreach_/DowngradeDomNodeChildNodesForeachRector.php | 4 ++-- .../FuncCall/DowngradeArrayFilterNullableCallbackRector.php | 4 ++-- .../FuncCall/DowngradeNumberFormatNoFourthArgRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrContainsRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrEndsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeStrStartsWithRector.php | 4 ++-- .../Rector/FuncCall/DowngradeSubstrFalsyRector.php | 4 ++-- .../FunctionLike/DowngradeMixedTypeDeclarationRector.php | 4 ++-- .../FunctionLike/DowngradeUnionTypeDeclarationRector.php | 4 ++-- .../Instanceof_/DowngradeInstanceofStringableRector.php | 4 ++-- .../DowngradePhp80ResourceReturnToObjectRector.php | 4 ++-- .../Rector/MethodCall/DowngradeNamedArgumentRector.php | 4 ++-- .../DowngradeReflectionClassGetConstantsFilterRector.php | 4 ++-- .../MethodCall/DowngradeReflectionGetAttributesRector.php | 4 ++-- .../DowngradeReflectionPropertyGetDefaultValueRector.php | 4 ++-- .../New_/DowngradeArbitraryExpressionsSupportRector.php | 4 ++-- .../DowngradeNullsafeToTernaryOperatorRector.php | 4 ++-- .../Rector/Property/DowngradeMixedTypeTypedPropertyRector.php | 4 ++-- .../Rector/Property/DowngradeUnionTypeTypedPropertyRector.php | 4 ++-- .../Rector/StaticCall/DowngradePhpTokenRector.php | 4 ++-- .../ClassConst/DowngradeFinalizePublicClassConstantRector.php | 4 ++-- .../ClassMethod/AddReturnTypeWillChangeAttributeRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayIsListRector.php | 4 ++-- .../FuncCall/DowngradeFirstClassCallableSyntaxRector.php | 4 ++-- .../Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php | 4 ++-- .../FunctionLike/DowngradeNeverTypeDeclarationRector.php | 4 ++-- .../Rector/FunctionLike/DowngradeNewInInitializerRector.php | 4 ++-- .../FunctionLike/DowngradePureIntersectionTypeRector.php | 4 ++-- .../DowngradePhp81ResourceReturnToObjectRector.php | 4 ++-- .../Rector/LNumber/DowngradeOctalNumberRector.php | 4 ++-- .../Rector/MethodCall/DowngradeIsEnumRector.php | 4 ++-- .../Rector/Property/DowngradeReadonlyPropertyRector.php | 4 ++-- .../DowngradeSetAccessibleReflectionPropertyRector.php | 4 ++-- .../DowngradeArrowFunctionNeverReturnTypeRector.php | 4 ++-- .../Rector/Class_/DowngradeReadonlyClassRector.php | 4 ++-- .../Rector/Class_/DowngradeUnionIntersectionRector.php | 4 ++-- .../Rector/FuncCall/DowngradeIteratorCountToArrayRector.php | 4 ++-- .../DowngradeStandaloneNullTrueFalseReturnTypeRector.php | 4 ++-- .../DowngradeReflectionMethodHasPrototypeRector.php | 4 ++-- .../Rector/ClassConst/DowngradeTypedClassConstRector.php | 4 ++-- .../ClassConstFetch/DowngradeDynamicClassConstFetchRector.php | 4 ++-- .../Rector/Class_/DowngradeReadonlyAnonymousClassRector.php | 4 ++-- .../Rector/FuncCall/DowngradeJsonValidateRector.php | 4 ++-- .../Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php | 4 ++-- .../Rector/Class_/DowngradeFinalPropertyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAllRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayAnyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindKeyRector.php | 4 ++-- .../Rector/Expression/DowngradeArrayFindRector.php | 4 ++-- .../Rector/FuncCall/DowngradeExitNamedArgumentRector.php | 4 ++-- .../Rector/FuncCall/DowngradeRoundingModeEnumRector.php | 4 ++-- .../DowngradeNewMethodCallWithoutParenthesesRector.php | 4 ++-- .../Rector/Class_/DowngradeFinalPropertyPromotionRector.php | 4 ++-- .../Rector/Expression/DowngradeVoidCastRector.php | 4 ++-- .../Rector/FuncCall/DowngradeArrayFirstLastRector.php | 4 ++-- .../StmtsAwareInterface/DowngradePipeOperatorRector.php | 4 ++-- rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php | 4 ++-- 98 files changed, 196 insertions(+), 196 deletions(-) diff --git a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php index 679a8459..ddf0aa3e 100644 --- a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php +++ b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php @@ -10,14 +10,14 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use Rector\Contract\Rector\ConfigurableRectorInterface; -use Rector\Doc\CodeSample\ConfiguredCodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeAnalyzer\BuiltInMethodAnalyzer; use Rector\DowngradePhp72\NodeAnalyzer\OverrideFromAnonymousClassMethodAnalyzer; use Rector\DowngradePhp72\NodeAnalyzer\SealedClassAnalyzer; use Rector\DowngradePhp72\PhpDoc\NativeParamToPhpDocDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\ConfiguredCodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\TypeDeclaration\NodeAnalyzer\AutowiredClassMethodOrPropertyAnalyzer; use Webmozart\Assert\Assert; diff --git a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php index 87ec98e9..1d92cd0a 100644 --- a/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php +++ b/rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php @@ -9,13 +9,13 @@ use PhpParser\Node\Expr\BinaryOp\BitwiseOr; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Stmt\If_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeManipulator\JsonConstCleaner; use Rector\Enum\JsonConstant; use Rector\NodeAnalyzer\DefineFuncCallAnalyzer; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php index d2a04253..f596cd3e 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php @@ -11,11 +11,11 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Ternary; use PHPStan\Type\BooleanType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradeJsonDecodeNullAssociativeArgRector\DowngradeJsonDecodeNullAssociativeArgRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php index cbe166fa..cd362793 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php @@ -20,12 +20,12 @@ use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeAnalyzer\RegexFuncAnalyzer; use Rector\DowngradePhp72\NodeManipulator\BitwiseFlagCleaner; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector\DowngradePregUnmatchedAsNullConstantRectorTest diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php index fd702a48..fbd5b27f 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php @@ -14,8 +14,6 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; @@ -24,6 +22,8 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://github.com/symfony/polyfill/commit/cc2bf55accd32b989348e2039e8c91cde46aebed diff --git a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php index 9f892a6f..e134a121 100644 --- a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php +++ b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\ObjectWithoutClassType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector\DowngradeObjectTypeDeclarationRectorTest diff --git a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php index e8ea41e6..eda16219 100644 --- a/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php +++ b/rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php @@ -18,14 +18,14 @@ use PhpParser\Node\Name\FullyQualified as NameFullyQualified; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp72\NodeManipulator\JsonConstCleaner; use Rector\Enum\JsonConstant; use Rector\NodeAnalyzer\DefineFuncCallAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\NodeTraverser\SimpleNodeTraverser; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.json-encode.php#refsect1-function.json-encode-changelog diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index 32c3f5ac..07cec6ff 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -25,13 +25,13 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/array_key_first_last diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php index 48ce923e..ffcdffd6 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Instanceof_; use PhpParser\Node\Name\FullyQualified; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is-countable diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index c55d942b..cf552b24 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; use PhpParser\Node\Expr\StaticCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector\DowngradeTrailingCommasInFunctionCallsRectorTest diff --git a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php index 8ba7afbb..32413670 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php @@ -11,10 +11,10 @@ use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector\SetCookieOptionsArrayToArgumentsRectorTest diff --git a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php index 11432bfd..a8dcc981 100644 --- a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php +++ b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php @@ -16,9 +16,9 @@ use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Expression; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/list_reference_assignment diff --git a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php index 8cf93ae5..38b48470 100644 --- a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php +++ b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php @@ -7,11 +7,11 @@ use PhpParser\Node; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByNewlineOnlyMaybeWithSemicolonAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector\DowngradeFlexibleHeredocSyntaxRectorTest diff --git a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php index 753bc58c..2b25df77 100644 --- a/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php +++ b/rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php @@ -6,11 +6,11 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Unset_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp73\Rector\Unset_\DowngradeTrailingCommasInUnsetRector\DowngradeTrailingCommasInUnsetRectorTest diff --git a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php index af735c02..f5746818 100644 --- a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php +++ b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php @@ -14,14 +14,14 @@ use PhpParser\Node\Stmt\ClassLike; use PHPStan\Analyser\MutatingScope; use PHPStan\Type\Type; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeAnalyzer\ArraySpreadAnalyzer; use Rector\DowngradePhp81\NodeFactory\ArrayMergeFromArraySpreadFactory; use Rector\PhpParser\AstResolver; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType; /** diff --git a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php index aeb5d888..fdb7baf4 100644 --- a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php +++ b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php @@ -16,12 +16,12 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/functions.arrow.php diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php index 8bcdc6c4..959ed25f 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php @@ -13,11 +13,11 @@ use PHPStan\Reflection\ClassReflection; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ParamAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\ValueObject\MethodName; use ReflectionMethod; diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index 44467a69..7b181a29 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -23,12 +23,12 @@ use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\DeadCode\PhpDoc\TagRemover\ReturnTagRemover; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType; use Rector\Util\Reflection\PrivatesAccessor; diff --git a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php index 7e5a18ab..ec2eb86b 100644 --- a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php +++ b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\AssignOp\Coalesce as AssignCoalesce; use PhpParser\Node\Expr\BinaryOp\Coalesce; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/null_coalesce_equal_operator diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php index d92cde7d..16072653 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\FuncCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector\DowngradeArrayMergeCallWithoutArgumentsRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php index a9f7c789..cf856978 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeProcOpenArrayCommandArgRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeProcOpenArrayCommandArgRector\DowngradeProcOpenArrayCommandArgRectorTest diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php index a5210d0c..e58e61e0 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php @@ -19,10 +19,10 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector\DowngradeStripTagsCallWithArrayRectorTest diff --git a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php index 4845dd9f..3b13a728 100644 --- a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php +++ b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector\DowngradeFreadFwriteFalsyToNegationRectorTest diff --git a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php index df15eaae..2267e81a 100644 --- a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php +++ b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Interface_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector\DowngradePreviouslyImplementedInterfaceRectorTest diff --git a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php index b3e984fe..79d6503b 100644 --- a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php +++ b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Int_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/numeric_literal_separator diff --git a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php index 350a0878..25accdfa 100644 --- a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php +++ b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector\DowngradeReflectionGetTypeRectorTest diff --git a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php index 98d27e0c..493f61af 100644 --- a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php +++ b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php @@ -8,11 +8,11 @@ use PhpParser\Node\Expr; use PhpParser\Node\NullableType; use PhpParser\Node\Stmt\Property; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\DowngradeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php index 01d152a0..df6b036e 100644 --- a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php +++ b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php @@ -9,10 +9,10 @@ use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\MagicConst; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks diff --git a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php index 4b71eceb..1179fb14 100644 --- a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php +++ b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php @@ -7,11 +7,11 @@ use PhpParser\Node; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Catch_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/non-capturing_catches diff --git a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php index 36efe191..998e299d 100644 --- a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php +++ b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassConstFetch\DowngradeClassOnObjectToGetClassRector\DowngradeClassOnObjectToGetClassRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php index 37da6d9e..9f72792f 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php @@ -8,10 +8,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeAbstractPrivateMethodInTraitRector\DowngradeAbstractPrivateMethodInTraitRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php index 6cab9711..c4ccb3f9 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector\DowngradeRecursiveDirectoryIteratorHasChildrenRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index 08f61c23..638baa0f 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -8,11 +8,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use PHPStan\Type\StaticType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector\DowngradeStaticTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php index c5816b4d..da54f5c6 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use PHPStan\Type\MixedType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\FamilyTree\NodeAnalyzer\ClassChildAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector\DowngradeStringReturnTypeOnToStringRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index 87449d1d..ca71f4a4 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -10,11 +10,11 @@ use PhpParser\Node\Param; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp73\Tokenizer\FollowedByCommaAnalyzer; use Rector\DowngradePhp73\Tokenizer\TrailingCommaRemover; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector\DowngradeTrailingCommasInParamUseRectorTest diff --git a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php index ed5828c6..77a0c4ab 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/RemoveReturnTypeDeclarationFromCloneRector.php @@ -6,9 +6,9 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassMethod; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://3v4l.org/Wgj19 diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php index 9d4caaed..bb7bdc41 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php @@ -19,12 +19,12 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; use Rector\Contract\Rector\ConfigurableRectorInterface; -use Rector\Doc\CodeSample\ConfiguredCodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation; use Rector\NodeFactory\DoctrineAnnotationFactory; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\ConfiguredCodeSample; +use Rector\RuleDoc\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php index 490a4904..75ee4e8a 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php @@ -19,12 +19,12 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Printer\BetterStandardPrinter; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php index 3d4ef0f3..ee52f539 100644 --- a/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php +++ b/rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php @@ -21,11 +21,11 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\NodeAnalyzer\EnumAnalyzer; use Rector\NodeFactory\ClassFromEnumFactory; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Enum_\DowngradeEnumToConstantListClassRector\DowngradeEnumToConstantListClassRectorTest diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php index 69c01215..2f256dcb 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php @@ -31,13 +31,13 @@ use PhpParser\Node\Stmt\Switch_; use PhpParser\NodeVisitor; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/match_expression_v2 diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php index 55978943..bccb8737 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php @@ -25,14 +25,14 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\CoalesceAnalyzer; use Rector\NodeFactory\NamedVariableFactory; use Rector\NodeManipulator\BinaryOpManipulator; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/throw_expression diff --git a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php index 52a1a6cd..44947ef8 100644 --- a/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php +++ b/rules/DowngradePhp80/Rector/Foreach_/DowngradeDomNodeChildNodesForeachRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Stmt\Foreach_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://github.com/php/php-src/pull/5180 https://bugs.php.net/bug.php?id=79271 diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php index 5b337cd7..1c5d7d1b 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php @@ -26,11 +26,11 @@ use PHPStan\Type\ClosureType; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\StringType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php index 47c96dfe..c788d0b1 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php @@ -8,10 +8,10 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use ReflectionFunction; /** diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php index 6aae3ac0..30f1e875 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\BooleanNot; use PhpParser\Node\Expr\FuncCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/str_contains diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php index 6365b4b3..4931e313 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php @@ -14,9 +14,9 @@ use PhpParser\Node\Expr\UnaryMinus; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php index 0db89585..a2eeb1bb 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php @@ -12,9 +12,9 @@ use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php index 5ed8ccbb..7eb22850 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php @@ -29,13 +29,13 @@ use PHPStan\Reflection\FunctionReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Type\Constant\ConstantIntegerType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\PHPStan\ParametersAcceptorSelectorVariantsWrapper; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.0/substr-out-of-bounds diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php index eb66eb4b..3b3da9b2 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\MixedType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector\DowngradeMixedTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php index cadea5db..0b47e964 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\UnionType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector\DowngradeUnionTypeDeclarationRectorTest diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php index 97d41859..771c3196 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradeInstanceofStringableRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\Instanceof_; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://wiki.php.net/rfc/stringable diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php index 0dd44ce1..0495fd23 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Instanceof_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index 70ee5ed3..f6d7b1ea 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -13,12 +13,12 @@ use PHPStan\Reflection\FunctionReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Type\MixedType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp80\NodeAnalyzer\UnnamedArgumentResolver; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; use Rector\Reflection\ReflectionResolver; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\DowngradeNamedArgumentRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php index ee3adeb5..3121edda 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php @@ -21,12 +21,12 @@ use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\NodeCollector\BinaryOpConditionsCollector; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector\DowngradeReflectionClassGetConstantsFilterRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php index e15a0b44..7415f0e9 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector\DowngradeReflectionGetAttributesRectorTest diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php index 76e050f1..b86363b4 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\BinaryOp\Coalesce; use PhpParser\Node\Expr\MethodCall; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector\DowngradeReflectionPropertyGetDefaultValueRectorTest diff --git a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php index a7439f41..bd532d78 100644 --- a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php +++ b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php @@ -16,12 +16,12 @@ use PhpParser\Node\Expr\StaticPropertyFetch; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeFactory\NamedVariableFactory; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/variable_syntax_tweaks#arbitrary_expression_support_for_new_and_instanceof diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index 9fba5ff2..99531086 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -13,9 +13,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector\DowngradeNullsafeToTernaryOperatorRectorTest diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php index b32e86df..4113b59d 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt\Property; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeMixedTypeTypedPropertyRector\DowngradeMixedTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php index 72dc5781..b7af3372 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Property; use PhpParser\Node\UnionType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\DowngradeUnionTypeTypedPropertyRectorTest diff --git a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php index 19721f21..b1be509a 100644 --- a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php +++ b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php @@ -17,9 +17,9 @@ use PHPStan\Type\ObjectType; use PHPStan\Type\ThisType; use PHPStan\Type\Type; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector\DowngradePhpTokenRectorTest diff --git a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php index b4346d9c..a5867d15 100644 --- a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php +++ b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/final-class-const diff --git a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php index 13d3d12c..9f0b327d 100644 --- a/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php +++ b/rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Class_; use PHPStan\Reflection\ReflectionProvider; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://php.watch/versions/8.1/ReturnTypeWillChange diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php index e3b83c3c..898b743a 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php @@ -15,14 +15,14 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Enum\NodeGroup; use Rector\PhpParser\Parser\InlineCodeParser; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/is_list diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php index 087dc034..56a0b32a 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php @@ -17,9 +17,9 @@ use PhpParser\Node\Name; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/first_class_callable_syntax diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php index 1dd77cec..3af563c2 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php @@ -13,13 +13,13 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\If_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHash\DowngradeHashAlgorithmXxHashRectorTest diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php index 5ed59917..1ac18251 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\NeverType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/noreturn_type diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php index 536d52f9..7090be30 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php @@ -27,12 +27,12 @@ use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Return_; use PhpParser\Node\UnionType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Php72\NodeFactory\AnonymousFunctionFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php index 4a9c092e..7720b980 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php @@ -10,10 +10,10 @@ use PhpParser\Node\IntersectionType; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/pure-intersection-types diff --git a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php index 517d9ada..3617bdc4 100644 --- a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php @@ -8,10 +8,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Instanceof_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp81\NodeManipulator\ObjectToResourceReturn; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.resource2object diff --git a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php index 42140f3c..6c0662e5 100644 --- a/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php +++ b/rules/DowngradePhp81/Rector/LNumber/DowngradeOctalNumberRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Scalar\Int_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.1/explicit-octal-notation diff --git a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php index 51c2970f..4c376429 100644 --- a/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php +++ b/rules/DowngradePhp81/Rector/MethodCall/DowngradeIsEnumRector.php @@ -10,9 +10,9 @@ use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Scalar\String_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp81\Rector\MethodCall\DowngradeIsEnumRector\DowngradeIsEnumRectorTest diff --git a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php index dac51c70..c28c350f 100644 --- a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php +++ b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php @@ -12,10 +12,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\ValueObject\MethodName; /** diff --git a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php index 7ae33b67..00c0c77a 100644 --- a/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php +++ b/rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php @@ -20,12 +20,12 @@ use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PhpParser\Enum\NodeGroup; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://phpbackend.com/blog/post/php-8-1-accessing-private-protected-properties-methods-via-reflection-api-is-now-allowed-without-calling-setAccessible diff --git a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php index c634300c..2210b7cd 100644 --- a/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php @@ -7,10 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Expr\ArrowFunction; use PHPStan\Type\NeverType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * PHP 8.1 accepts the "never" return type everywhere except on arrow functions, where the implicit diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php index e4b5d860..726c2d28 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/readonly_classes diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php index 19a88f09..8717f092 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php @@ -14,11 +14,11 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\UnionType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\PhpDocDecorator\PhpDocFromTypeDeclarationDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php index 84e6dc90..8b4ee701 100644 --- a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php +++ b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php @@ -12,10 +12,10 @@ use PhpParser\Node\Name\FullyQualified; use PHPStan\Type\Type; use PHPStan\Type\TypeCombinator; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeAnalyzer\ArgsAnalyzer; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Webmozart\Assert\Assert; /** diff --git a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php index b041820b..e92a5e4a 100644 --- a/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php +++ b/rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php @@ -20,11 +20,11 @@ use PHPStan\Type\UnionType as PHPStanUnionType; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\PhpParser\AstResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\StaticTypeMapper\StaticTypeMapper; /** diff --git a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php index 90d1268f..9cec9933 100644 --- a/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php +++ b/rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php @@ -20,11 +20,11 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\TryCatch; use PHPStan\Type\ObjectType; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp82\Rector\MethodCall\DowngradeReflectionMethodHasPrototypeRector\DowngradeReflectionMethodHasPrototypeRectorTest diff --git a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php index d5f2b257..188ac837 100644 --- a/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php +++ b/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeManipulator\PropertyDecorator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/typed_class_constants diff --git a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php index 92dfb4a2..242e6246 100644 --- a/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php +++ b/rules/DowngradePhp83/Rector/ClassConstFetch/DowngradeDynamicClassConstFetchRector.php @@ -9,9 +9,9 @@ use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/dynamic_class_constant_fetch diff --git a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php index d4fa0f4b..40cadcbb 100644 --- a/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php +++ b/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php @@ -6,10 +6,10 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\DowngradePhp82\NodeManipulator\DowngradeReadonlyClassManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://www.php.net/manual/en/migration83.new-features.php#migration83.new-features.core.readonly-modifier-improvements diff --git a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php index b6ff1f6b..2fe5b4fe 100644 --- a/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php +++ b/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php @@ -15,8 +15,6 @@ use PhpParser\Node\Stmt\Return_; use PhpParser\Node\Stmt\Switch_; use PHPStan\Analyser\Scope; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Exception\ShouldNotHappenException; use Rector\Naming\Naming\VariableNaming; use Rector\NodeAnalyzer\ExprInTopStmtMatcher; @@ -25,6 +23,8 @@ use Rector\PhpParser\Parser\InlineCodeParser; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/json_validate diff --git a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php index 58923535..bf1fb274 100644 --- a/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php +++ b/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php @@ -16,10 +16,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\PhpParser\Node\Value\ValueResolver; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/deprecated_attribute diff --git a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php index 7b81d2f2..7e58df45 100644 --- a/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php +++ b/rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php @@ -13,9 +13,9 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/property-hooks#final_properties diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php index 094a667b..2228ef25 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php @@ -18,11 +18,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php index 8b8474ad..be3d05ed 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php index d03803ca..1fed7b9c 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php index 2b944575..525b2688 100644 --- a/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php +++ b/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php @@ -17,11 +17,11 @@ use PhpParser\Node\Stmt\Foreach_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Return_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://php.watch/versions/8.4/array_find-array_find_key-array_any-array_all diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php index a67e6f6b..a1952ebc 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeExitNamedArgumentRector.php @@ -8,9 +8,9 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Identifier; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/exit-as-function diff --git a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php index fe277f93..9badfc6b 100644 --- a/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php +++ b/rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php @@ -12,9 +12,9 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; use PhpParser\Node\Name\FullyQualified; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum diff --git a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php index e67223d8..a6c815fc 100644 --- a/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php +++ b/rules/DowngradePhp84/Rector/MethodCall/DowngradeNewMethodCallWithoutParenthesesRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\New_; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @changelog https://wiki.php.net/rfc/new_without_parentheses diff --git a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php index 790f6692..18a911ec 100644 --- a/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php +++ b/rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php @@ -12,10 +12,10 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Comments\NodeDocBlock\DocBlockUpdater; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; use Rector\ValueObject\MethodName; use Rector\ValueObject\Visibility; diff --git a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php index e7244f8c..f5cfc271 100644 --- a/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php +++ b/rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php @@ -9,11 +9,11 @@ use PhpParser\Node\Expr\Cast\Void_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Naming\Naming\VariableNaming; use Rector\PHPStan\ScopeFetcher; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://wiki.php.net/rfc/marking_return_value_as_important diff --git a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php index dc0bf56a..be2775d5 100644 --- a/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php +++ b/rules/DowngradePhp85/Rector/FuncCall/DowngradeArrayFirstLastRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\FuncCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://php.watch/versions/8.5/array_first-array_last diff --git a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php index 09cd2248..bde4a46e 100644 --- a/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php +++ b/rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php @@ -15,11 +15,11 @@ use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\NodeFactory\NamedVariableFactory; use Rector\PhpParser\Enum\NodeGroup; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see \Rector\Tests\DowngradePhp85\Rector\StmtsAwareInterface\DowngradePipeOperatorRector\DowngradePipeOperatorRectorTest diff --git a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php index 3f05788e..5991762d 100644 --- a/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php +++ b/rules/DowngradePhp86/Rector/FuncCall/DowngradeClampRector.php @@ -7,9 +7,9 @@ use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; -use Rector\Doc\CodeSample\CodeSample; -use Rector\Doc\RuleDefinition; use Rector\Rector\AbstractRector; +use Rector\RuleDoc\CodeSample\CodeSample; +use Rector\RuleDoc\RuleDefinition; /** * @see https://wiki.php.net/rfc/clamp_v2