metrics[] = [ 'namespace' => $namespace, 'key' => $key, 'value' => $value, ]; return $this; } /** * Executes the function event and sends it to the functions worker. * * @return bool */ public function trigger(): string|bool { $client = new Client($this->queue, $this->connection); return $client->enqueue([ 'project' => $this->project, 'user' => $this->user, 'type' => $this->type, 'payload' => $this->payload, 'metrics' => $this->metrics, ]); } }