*/ final class ExprNodeMapper implements PhpParserNodeMapperInterface { public function getNodeType() : string { return Expr::class; } /** * @param Expr $node */ public function mapToPHPStan(Node $node) : Type { $scope = $node->getAttribute(AttributeKey::SCOPE); if (!$scope instanceof Scope) { return new MixedType(); } return $scope->getType($node); } }