diff --git a/rules/DowngradePhp71/TypeDeclaration/PhpDocFromTypeDeclarationDecorator.php b/packages/BetterPhpDocParser/PhpDocParser/PhpDocFromTypeDeclarationDecorator.php similarity index 98% rename from rules/DowngradePhp71/TypeDeclaration/PhpDocFromTypeDeclarationDecorator.php rename to packages/BetterPhpDocParser/PhpDocParser/PhpDocFromTypeDeclarationDecorator.php index e6766e9972d..4dcfc82add6 100644 --- a/rules/DowngradePhp71/TypeDeclaration/PhpDocFromTypeDeclarationDecorator.php +++ b/packages/BetterPhpDocParser/PhpDocParser/PhpDocFromTypeDeclarationDecorator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Rector\DowngradePhp71\TypeDeclaration; +namespace Rector\BetterPhpDocParser\PhpDocParser; use PhpParser\Node; use PhpParser\Node\Expr\Closure; diff --git a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php index 4d5555a36c5..1d882ead67c 100644 --- a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\ReflectionProvider; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; diff --git a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php index ab4ccb96906..8c03031527d 100644 --- a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php @@ -9,8 +9,8 @@ use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\ThisType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php index f709e767cb1..503220de294 100644 --- a/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php @@ -22,8 +22,8 @@ use PHPStan\Type\IntegerType; use PHPStan\Type\StringType; use PHPStan\Type\Type; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php index 127783a15ad..e11b745f1f3 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php @@ -10,8 +10,8 @@ use PhpParser\Node\Stmt\Function_; use PHPStan\Type\IterableType; use PHPStan\Type\MixedType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php index 1bee9c13466..8c8b935ff3f 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php @@ -11,10 +11,10 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\NodeAnalyzer\ParamAnalyzer; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php index 3f651301c57..201e03adc42 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\VoidType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php index 8d454d97502..de0e85d0d65 100644 --- a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php +++ b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php @@ -8,8 +8,8 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\ObjectWithoutClassType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index 538ad3f649c..bb381e30f57 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -9,8 +9,8 @@ use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\StaticType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php index 7dc84bccbc6..0f202a10c94 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PHPStan\Type\MixedType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php index e670d7056ea..7d002c30522 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php @@ -9,8 +9,8 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\UnionType; +use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator; use Rector\Core\Rector\AbstractRector; -use Rector\DowngradePhp71\TypeDeclaration\PhpDocFromTypeDeclarationDecorator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;