public function leaveNode(Node $node)
    {
        if (self::isConditional($node)) {
            $this->conditionalScopes--;
        } elseif ($node instanceof New_) {
            $this->validateNewExpression($node);
        } elseif ($node instanceof ClassConstFetch) {
            $this->validateClassConstFetchExpression($node);
        } elseif ($node instanceof StaticCall) {
            $this->validateStaticCallExpression($node);
        }
    }
public function leaveNode(Node $node)
    {
        if (self::isConditional($node)) {
            $this->conditionalScopes--;
        } elseif ($node instanceof New_) {
            $this->validateNewExpression($node);
        } elseif ($node instanceof ClassConstFetch) {
            $this->validateClassConstFetchExpression($node);
        } elseif ($node instanceof StaticCall) {
            $this->validateStaticCallExpression($node);
        }
    }
public function leaveNode ( Node $ node ) { if ( self :: isConditional ( $ node ) ) { $ this -> conditionalScopes -- ; } elseif ( $ node instanceof New_ ) { $ this -> validateNewExpression ( $ node ) ; } elseif ( $ node instanceof ClassConstFetch ) { $ this -> validateClassConstFetchExpression ( $ node ) ; } elseif ( $ node instanceof StaticCall ) { $ this -> validateStaticCallExpression ( $ node ) ; } }
Validate `new` expressions, class constant fetches, and static calls.

@throws FatalErrorException if a class, interface or trait is referenced which does not exist
@throws FatalErrorException if a class extends something that is not a class
@throws FatalErrorException if a class implements something that is not an interface
@throws FatalErrorException if an interface extends something that is not an interface
@throws FatalErrorException if a class, interface or trait redefines an existing class, interface or trait name

@param Node $node
Validate new expressions class constant fetches and static calls .