fix PHP4ConstructorRector

This commit is contained in:
Tomas Votruba 2018-12-20 20:38:37 +01:00
parent 5685b17a78
commit 8e345870cd

View File

@ -126,11 +126,15 @@ CODE_SAMPLE
/** @var Expression $methodStmt */ /** @var Expression $methodStmt */
foreach ($classMethodNode->stmts as $methodStmt) { foreach ($classMethodNode->stmts as $methodStmt) {
if (! $methodStmt->expr instanceof StaticCall) { if ($methodStmt instanceof Expression) {
$methodStmt = $methodStmt->expr;
}
if (! $methodStmt instanceof StaticCall) {
continue; continue;
} }
$this->processParentPhp4ConstructCall($methodStmt->expr); $this->processParentPhp4ConstructCall($methodStmt);
} }
} }