public function allowsNull()
    {
        if (!empty($this->node->type)) {
            // with type hint, checks if NULL constant provided
            if ($this->node->default instanceof Node\Expr\ConstFetch
                && $this->node->default->name instanceof Node\Name
                && strcasecmp('null', (string)$this->node->default->name) === 0
            ) {
                return true;
            }
            return false;
        }
        return true;
    }
public function allowsNull()
    {
        if (!empty($this->node->type)) {
            // with type hint, checks if NULL constant provided
            if ($this->node->default instanceof Node\Expr\ConstFetch
                && $this->node->default->name instanceof Node\Name
                && strcasecmp('null', (string)$this->node->default->name) === 0
            ) {
                return true;
            }
            return false;
        }
        return true;
    }
public function allowsNull ( ) { if ( ! empty ( $ this -> node -> type ) ) { // with type hint, checks if NULL constant provided if ( $ this -> node -> default instanceof Node \ Expr \ ConstFetch && $ this -> node -> default -> name instanceof Node \ Name && strcasecmp ( 'null' , ( string ) $ this -> node -> default -> name ) === 0 ) { return true ; } return false ; } return true ; }
Checks whether the parameter allows NULL.

If a type is defined, null is allowed only if default value is null.

@return bool TRUE if NULL is allowed, otherwise FALSE
Checks whether the parameter allows NULL .