protected function validateType($value)
    {
        if (!$value instanceof Closure && $value !== null) {
            $exception = new InvalidTypeException(sprintf(
                'Invalid type for path "%s". Expected closure, but got %s.',
                $this->getPath(),
                gettype($value)
            ));

            if ($hint = $this->getInfo()) {
                $exception->addHint($hint);
            }

            $exception->setPath($this->getPath());

            throw $exception;
        }
    }
protected function validateType($value)
    {
        if (!$value instanceof Closure && $value !== null) {
            $exception = new InvalidTypeException(sprintf(
                'Invalid type for path "%s". Expected closure, but got %s.',
                $this->getPath(),
                gettype($value)
            ));

            if ($hint = $this->getInfo()) {
                $exception->addHint($hint);
            }

            $exception->setPath($this->getPath());

            throw $exception;
        }
    }
protected function validateType ( $ value ) { if ( ! $ value instanceof Closure && $ value !== null ) { $ exception = new InvalidTypeException ( sprintf ( 'Invalid type for path "%s". Expected closure, but got %s.' , $ this -> getPath ( ) , gettype ( $ value ) ) ) ; if ( $ hint = $ this -> getInfo ( ) ) { $ exception -> addHint ( $ hint ) ; } $ exception -> setPath ( $ this -> getPath ( ) ) ; throw $ exception ; } }
Validates the type of a Node.

@param mixed $value The value to validate

@throws InvalidTypeException when the value is invalid
Validates the type of a Node .