Assert\AssertionChain::nullOr PHP Method

nullOr() public method

Switch chain into mode allowing nulls, ignoring further assertions.
public nullOr ( ) : AssertionChain
return AssertionChain
    public function nullOr()
    {
        if ($this->value === null) {
            $this->alwaysValid = true;
        }
        return $this;
    }