Updated Rector to commit 13bafcba1524782c349fe6523ce9c18d0f765452

13bafcba15 [Php72][TypeDeclaration] Fix infinite loop on ParseStrWithResultArgumentRector+DeclareStrictTypesRector (#5699)
This commit is contained in:
Tomas Votruba 2024-03-07 21:09:46 +00:00
parent a9ac2b236c
commit 2e30301381
2 changed files with 9 additions and 4 deletions

View File

@ -52,16 +52,21 @@ CODE_SAMPLE
if ($newStmts === []) {
return null;
}
$rootStmt = \current($newStmts);
// use 0 index to avoid infinite loop
$rootStmt = $newStmts[0] ?? null;
$stmt = $rootStmt;
if ($rootStmt instanceof FileWithoutNamespace) {
$currentStmt = \current($rootStmt->stmts);
// use 0 index to avoid infinite loop
$currentStmt = $rootStmt->stmts[0] ?? null;
if (!$currentStmt instanceof Stmt) {
return null;
}
$nodes = $rootStmt->stmts;
$stmt = $currentStmt;
}
if (!$stmt instanceof Stmt) {
return null;
}
if ($this->shouldSkip($stmt)) {
return null;
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '62254600d1d3f036ae3e9c502613c4ac96a8b71b';
public const PACKAGE_VERSION = '13bafcba1524782c349fe6523ce9c18d0f765452';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-07 23:31:56';
public const RELEASE_DATE = '2024-03-08 04:07:33';
/**
* @var int
*/