diff --git a/src/Resolver/NodeExpressionResolver.php b/src/Resolver/NodeExpressionResolver.php index 778d203..93df977 100644 --- a/src/Resolver/NodeExpressionResolver.php +++ b/src/Resolver/NodeExpressionResolver.php @@ -589,6 +589,16 @@ protected function resolveExprBinaryOpLogicalXor(Expr\BinaryOp\LogicalXor $node) return $this->resolve($node->left) xor $this->resolve($node->right); } + protected function resolveExprUnaryMinus(Expr\UnaryMinus $node): int|float + { + return -$this->resolve($node->expr); + } + + protected function resolveExprUnaryPlus(Expr\UnaryPlus $node): int|float + { + return $this->resolve($node->expr); + } + private function getDispatchMethodFor(Node $node): string { $nodeType = $node->getType();