Skip to content

Commit 10fd8e5

Browse files
committed
Updated Rector to commit 02a30d483fe28abc9315a7e6bf809614750c95ab
rectorphp/rector-src@02a30d4 [Php55] Handle crash after exit() on GetCalledClassToSelfClassRector (#5372)
1 parent 5f40a31 commit 10fd8e5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'affdec96db31156ab2b05a5801f980e284e291a5';
22+
public const PACKAGE_VERSION = '02a30d483fe28abc9315a7e6bf809614750c95ab';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2023-12-17 22:31:31';
27+
public const RELEASE_DATE = '2023-12-18 12:35:53';
2828
/**
2929
* @var int
3030
*/

src/PHPStan/NodeVisitor/UnreachableStatementNodeVisitor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
namespace Rector\Core\PHPStan\NodeVisitor;
55

66
use PhpParser\Node;
7+
use PhpParser\Node\Expr\Exit_;
78
use PhpParser\Node\Stmt\ClassLike;
89
use PhpParser\Node\Stmt\Declare_;
10+
use PhpParser\Node\Stmt\Expression;
911
use PhpParser\NodeVisitorAbstract;
1012
use PHPStan\Analyser\MutatingScope;
1113
use Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface;
@@ -47,6 +49,10 @@ public function enterNode(Node $node) : ?Node
4749
$mutatingScope = $node->getAttribute(AttributeKey::SCOPE);
4850
$mutatingScope = $mutatingScope instanceof MutatingScope ? $mutatingScope : $this->scopeFactory->createFromFile($this->filePath);
4951
foreach ($node->stmts as $stmt) {
52+
if ($stmt instanceof Expression && $stmt->expr instanceof Exit_) {
53+
$isPassedUnreachableStmt = \true;
54+
continue;
55+
}
5056
if ($stmt->getAttribute(AttributeKey::IS_UNREACHABLE) === \true) {
5157
$isPassedUnreachableStmt = \true;
5258
continue;

0 commit comments

Comments
 (0)