src/main/php/Result.php
public function whenEmpty($other): self
    {
        if (!$this->isEmpty($this->value)) {
            return $this;
        }

        return self::of($other);
    }
public function whenEmpty($other): self
    {
        if (!$this->isEmpty($this->value)) {
            return $this;
        }

        return self::of($other);
    }
public function whenEmpty ( $ other ) : self { if ( ! $ this -> isEmpty ( $ this -> value ) ) { return $ this ; } return self :: of ( $ other ) ; }
returns the result if value is not empty, or result of other

@param   mixed  $other
@return  \stubbles\values\Result
@since   6.2.0
returns the result if value is not empty or result of other