/** * @param string $status */ public function setStatus($status) { if (!OrderStatus::validatStatus($status)) { throw new \InvalidArgumentException('State not allowed'); } $this->status = $status; return $this; }