wrappedObject->enabled_components_lowest()->first()) { return $component->status; } } /** * Returns the lowest component status, readable by humans. * * @return string|null */ public function lowest_human_status() { if ($component = $this->wrappedObject->enabled_components_lowest()->first()) { return $component->human_status; } } /** * Returns the lowest component status color. * * @return string|null */ public function lowest_status_color() { if ($component = $this->wrappedObject->enabled_components_lowest()->first()) { return $component->status_color; } } /** * Convert the presenter instance to an array. * * @return string[] */ public function toArray() { return array_merge($this->wrappedObject->toArray(), [ 'created_at' => $this->created_at(), 'updated_at' => $this->updated_at(), 'lowest_human_status' => $this->lowest_human_status(), ]); } }