['label' => 'Manual', 'description' => 'Run from the administration area or API.'], 'schedule' => ['label' => 'Schedule', 'description' => 'Run when next_run_at is due.'], 'webhook' => ['label' => 'Incoming webhook', 'description' => 'Run from a signed API request.'], 'domain_event' => ['label' => 'Domain event', 'description' => 'Run when an application event is dispatched.'], ]; } public function has(string $type): bool { return array_key_exists($type, $this->all()); } }