kahlan\Suite::status PHP Method

status() public method

Gets exit status code according passed results.
public status ( integer $status = null ) : boolean
$status integer If set force a specific status to be retruned.
return boolean Returns `0` if no error occurred, `-1` otherwise.
    public function status($status = null)
    {
        if (func_num_args()) {
            $this->_status = $status;
            return $this;
        }
        if ($this->focused()) {
            return -1;
        }
        if ($this->_status !== null) {
            return $this->_status;
        }
        return $this->passed() ? 0 : -1;
    }