Skip to content

Commit

Permalink
Updated Rector to commit 5c30f2491c3fb03ff38fbc524a02b9baa2e3f96c
Browse files Browse the repository at this point in the history
rectorphp/rector-src@5c30f24 [Performance] Reduce double traverse on AddNeverReturnType (#6305)
  • Loading branch information
TomasVotruba committed Sep 15, 2024
1 parent 056f704 commit a210f20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ private function shouldSkip($node, Scope $scope) : bool
*/
private function hasReturnOrYields($node) : bool
{
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, Return_::class)) {
return \true;
}
return $this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, \array_merge([Yield_::class, YieldFrom::class], ControlStructure::CONDITIONAL_NODE_SCOPE_TYPES));
return $this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, \array_merge([Return_::class, Yield_::class, YieldFrom::class], ControlStructure::CONDITIONAL_NODE_SCOPE_TYPES));
}
/**
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure $node
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5da2f3302522508e64b7b74e649f06e45f7b70db';
public const PACKAGE_VERSION = '5c30f2491c3fb03ff38fbc524a02b9baa2e3f96c';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-09-15 08:12:52';
public const RELEASE_DATE = '2024-09-15 08:21:32';
/**
* @var int
*/
Expand Down

0 comments on commit a210f20

Please sign in to comment.