This commit is contained in:
TomasVotruba 2020-01-19 22:35:03 +01:00
parent 8d22139ec6
commit a74b6617bc
2 changed files with 2 additions and 6 deletions

View File

@ -270,9 +270,7 @@ PHP
// this node was just used, skip to next one
return $previousNode !== null && ($previousNode->isType(
VariableNodeUseInfo::TYPE_ASSIGN
) && $nodeByTypeAndPosition->isType(
VariableNodeUseInfo::TYPE_USE
));
) && $nodeByTypeAndPosition->isType(VariableNodeUseInfo::TYPE_USE));
}
private function shouldRemoveAssignNode(

View File

@ -221,9 +221,7 @@ final class IfManipulator
if ($this->betterStandardPrinter->areNodesEqual(
$notIdentical->left,
$returnNode->expr
) && $this->constFetchManipulator->isNull(
$notIdentical->right
)) {
) && $this->constFetchManipulator->isNull($notIdentical->right)) {
return $notIdentical->left;
}