diff --git a/docs/rector_rules_overview.md b/docs/rector_rules_overview.md index 31af46f9037..fe087979335 100644 --- a/docs/rector_rules_overview.md +++ b/docs/rector_rules_overview.md @@ -7182,10 +7182,10 @@ Add return type to function like with return new ```diff final class SomeClass { -- public function action() -+ public function action(): Response +- public function create() ++ public function create(): Project { - return new Response(); + return new Project(); } } ``` diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php index 982538d6c24..82edaf3c644 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php @@ -3,7 +3,6 @@ declare (strict_types=1); namespace Rector\TypeDeclaration\Rector\ClassMethod; -use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer; use PhpParser\Node; use PhpParser\Node\Expr\New_; use PhpParser\Node\Name; @@ -30,6 +29,7 @@ use Rector\Reflection\ReflectionResolver; use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\StaticTypeMapper\ValueObject\Type\SelfStaticType; use Rector\Symfony\CodeQuality\Enum\ResponseClass; +use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer; use Rector\TypeDeclaration\NodeAnalyzer\ReturnAnalyzer; use Rector\TypeDeclaration\NodeAnalyzer\ReturnTypeAnalyzer\StrictReturnNewAnalyzer; use Rector\ValueObject\PhpVersionFeature; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3ee2bdddfd4..00f08689b74 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'aa90b800b54459bf2999eca94c101a6c0d51e4d8'; + public const PACKAGE_VERSION = 'c62c1dea338589bcc3aa96b50bcabade2d470483'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-08-03 10:24:26'; + public const RELEASE_DATE = '2024-08-04 00:30:39'; /** * @var int */