execute($commands, $database, $activity); } return remote_process($commands, $database->destination->server, callEventOnFinish: 'DatabaseStatusChanged', queue: deployment_queue()); } /** * Whether a `KEY=value` list already defines the exact key (not just a key or value containing it). * * @param Collection $environmentVariables */ private function hasEnvironmentVariable(Collection $environmentVariables, string $key): bool { return $environmentVariables->contains(fn ($variable) => str($variable)->before('=')->value() === $key); } }