mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 0348124a5535b99712da4debc136d2e73647b97a
0348124a55
[CodeQuality] Skip Switch_ always returned on ExplicitReturnNullRector (#5800)
This commit is contained in:
parent
6e65fef1e7
commit
b352c8473a
|
@ -13,6 +13,7 @@ use PhpParser\Node\Expr\YieldFrom;
|
|||
use PhpParser\Node\FunctionLike;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\Break_;
|
||||
use PhpParser\Node\Stmt\Case_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Continue_;
|
||||
use PhpParser\Node\Stmt\Do_;
|
||||
|
@ -149,8 +150,11 @@ final class SilentVoidResolver
|
|||
return \false;
|
||||
}
|
||||
$casesWithReturnOrExitCount = $this->resolveReturnOrExitCount($switch);
|
||||
$cases = \array_filter($switch->cases, static function (Case_ $case) : bool {
|
||||
return $case->stmts !== [];
|
||||
});
|
||||
// has same amount of first return or exit nodes as switches
|
||||
return \count($switch->cases) === $casesWithReturnOrExitCount;
|
||||
return \count($cases) === $casesWithReturnOrExitCount;
|
||||
}
|
||||
private function isTryCatchAlwaysReturnOrExit(TryCatch $tryCatch) : bool
|
||||
{
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '88648d1e6fe18bcc67ea76ebdc76c1d1e6d1fe6f';
|
||||
public const PACKAGE_VERSION = '0348124a5535b99712da4debc136d2e73647b97a';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-04-03 13:36:35';
|
||||
public const RELEASE_DATE = '2024-04-03 21:15:24';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue