Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Dec 1, 2025

as in

  • if ($node instanceof Node\Expr\UnaryPlus) {
    return $this->getType($node->expr)->toNumber();
    }
  • } elseif (
    $expr instanceof Expr\BitwiseNot
    || $expr instanceof Cast
    || $expr instanceof Expr\Clone_
    || $expr instanceof Expr\UnaryMinus
    || $expr instanceof Expr\UnaryPlus
    ) {
    $result = $this->processExprNode($stmt, $expr->expr, $scope, $nodeCallback, $context->enterDeep());
    $throwPoints = $result->getThrowPoints();
    $impurePoints = $result->getImpurePoints();
    $isAlwaysTerminating = $result->isAlwaysTerminating();
    $hasYield = $result->hasYield();
    $scope = $result->getScope();
    } elseif ($expr instanceof Expr\Eval_) {

@staabm staabm marked this pull request as ready for review December 1, 2025 06:50
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 3bd2d8b into phpstan:2.1.x Dec 1, 2025
609 of 639 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the unaryp branch December 1, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants