public function state(array $options = [])
    {
        if (!$this->done($options)) {
            return self::STATE_IN_PROGRESS;
        }

        if ($this->done() && $this->result()) {
            return self::STATE_SUCCESS;
        }

        return self::STATE_ERROR;
    }