mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 13bafcba1524782c349fe6523ce9c18d0f765452
13bafcba15
[Php72][TypeDeclaration] Fix infinite loop on ParseStrWithResultArgumentRector+DeclareStrictTypesRector (#5699)
This commit is contained in:
parent
a9ac2b236c
commit
2e30301381
|
@ -52,16 +52,21 @@ CODE_SAMPLE
|
||||||
if ($newStmts === []) {
|
if ($newStmts === []) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$rootStmt = \current($newStmts);
|
// use 0 index to avoid infinite loop
|
||||||
|
$rootStmt = $newStmts[0] ?? null;
|
||||||
$stmt = $rootStmt;
|
$stmt = $rootStmt;
|
||||||
if ($rootStmt instanceof FileWithoutNamespace) {
|
if ($rootStmt instanceof FileWithoutNamespace) {
|
||||||
$currentStmt = \current($rootStmt->stmts);
|
// use 0 index to avoid infinite loop
|
||||||
|
$currentStmt = $rootStmt->stmts[0] ?? null;
|
||||||
if (!$currentStmt instanceof Stmt) {
|
if (!$currentStmt instanceof Stmt) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$nodes = $rootStmt->stmts;
|
$nodes = $rootStmt->stmts;
|
||||||
$stmt = $currentStmt;
|
$stmt = $currentStmt;
|
||||||
}
|
}
|
||||||
|
if (!$stmt instanceof Stmt) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ($this->shouldSkip($stmt)) {
|
if ($this->shouldSkip($stmt)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '62254600d1d3f036ae3e9c502613c4ac96a8b71b';
|
public const PACKAGE_VERSION = '13bafcba1524782c349fe6523ce9c18d0f765452';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2024-03-07 23:31:56';
|
public const RELEASE_DATE = '2024-03-08 04:07:33';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue