/** * @return boolean */ public function isStopped() { if (is_int($this->status)) { return $this->status == Status::STATUS_STOPPED; } else { return $this->status->isStopped(); } }
/** * @test */ public function shouldConstructUsingStatusInstance() { $state = new Status(Status::STATUS_STOPPED); $status = new Status($state); $this->assertTrue($status->isStopped()); }
/** * @return boolean */ public function isStopped() { return $this->status->isStopped(); }