From bbc5e3d7bbc68f101da9389270bccf20a66e0014 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 23 Apr 2020 13:54:51 +1000 Subject: [PATCH] Return --- src/Collector.php | 2 ++ src/Collector/Generator.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Collector.php b/src/Collector.php index 061c39b..c617122 100644 --- a/src/Collector.php +++ b/src/Collector.php @@ -18,6 +18,8 @@ public function create($metric) $this->metric = $metric; $this->metric->datetime = date("Y-m-d H:i:s"); $this->metric->api_key = config('collector.api_key'); + + return $this; } public function increment() diff --git a/src/Collector/Generator.php b/src/Collector/Generator.php index b8c15f8..5db87a5 100644 --- a/src/Collector/Generator.php +++ b/src/Collector/Generator.php @@ -21,7 +21,7 @@ private function httpClient() return new \GuzzleHttp\Client(['headers' => ['X-API-KEY' => $this->apiKey()]]); } - private function fire($metric) + public function fire($metric) { $client = $this->httpClient(); $response = $client->request('POST',$this->endPoint(), ['form_params' => $metric]);