public function isState($state) { return $state === Runtime::STATE_FAILED && $this->failureHash !== null || $this->state === $state; }