Updated Rector to commit 02a30d483fe28abc9315a7e6bf809614750c95ab

02a30d483f [Php55] Handle crash after exit() on GetCalledClassToSelfClassRector (#5372)
This commit is contained in:
Tomas Votruba 2023-12-18 05:38:03 +00:00
parent 5f40a31427
commit 10fd8e5374
2 changed files with 8 additions and 2 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'affdec96db31156ab2b05a5801f980e284e291a5';
public const PACKAGE_VERSION = '02a30d483fe28abc9315a7e6bf809614750c95ab';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-17 22:31:31';
public const RELEASE_DATE = '2023-12-18 12:35:53';
/**
* @var int
*/

View File

@ -4,8 +4,10 @@ declare (strict_types=1);
namespace Rector\Core\PHPStan\NodeVisitor;
use PhpParser\Node;
use PhpParser\Node\Expr\Exit_;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Expression;
use PhpParser\NodeVisitorAbstract;
use PHPStan\Analyser\MutatingScope;
use Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface;
@ -47,6 +49,10 @@ final class UnreachableStatementNodeVisitor extends NodeVisitorAbstract
$mutatingScope = $node->getAttribute(AttributeKey::SCOPE);
$mutatingScope = $mutatingScope instanceof MutatingScope ? $mutatingScope : $this->scopeFactory->createFromFile($this->filePath);
foreach ($node->stmts as $stmt) {
if ($stmt instanceof Expression && $stmt->expr instanceof Exit_) {
$isPassedUnreachableStmt = \true;
continue;
}
if ($stmt->getAttribute(AttributeKey::IS_UNREACHABLE) === \true) {
$isPassedUnreachableStmt = \true;
continue;