locksTime(); } /** * @return list */ public static function openStatuses(): array { return array_values(array_filter(self::cases(), fn (self $status): bool => $status->isOpen())); } /** * Whether moving from this status to $to opens the lock on hours and expenses. */ public function unlocksTo(self $to): bool { return $this->locksTime() && ! $to->locksTime(); } /** * The Kanban columns: every status except archived. * * @return list */ public static function kanbanStatuses(): array { $statuses = []; foreach (self::cases() as $status) { if ($status !== self::Archived) { $statuses[] = $status; } } return $statuses; } }