Skip to content

Commit

Permalink
fix FuncCall node name
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Nov 8, 2021
1 parent 7960b00 commit 0b2ceb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public function getNodeTypes(): array
*/
public function refactor(Node $node): Assign
{
$powCall = $this->nodeFactory->createFuncCall('pow', [$node->var, $node->expr]);
$powFuncCall = $this->nodeFactory->createFuncCall('pow', [$node->var, $node->expr]);

return new Assign($node->var, $powCall);
return new Assign($node->var, $powFuncCall);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@ private function isNullableTypeSubType(Type $currentType, Type $inferedType): bo
return false;
}

return $currentType->isSubTypeOf($currentType)
// probably more/less strict union type on purpose
if ($currentType->isSubTypeOf($inferedType)
->yes()) {
return true;
}

return $inferedType->isSubTypeOf($currentType)
->yes();
}

Expand Down

0 comments on commit 0b2ceb4

Please sign in to comment.