diff --git a/src/Analytics/Adapter.php b/src/Analytics/Adapter.php index 048bbcd..564bded 100644 --- a/src/Analytics/Adapter.php +++ b/src/Analytics/Adapter.php @@ -45,7 +45,7 @@ abstract public function getName(): string; /** * Global Headers * - * @var array + * @var array */ protected $headers = [ 'Content-Type' => '', @@ -133,7 +133,7 @@ public function createEvent(Event $event): bool * @return array|string * @throws \Exception */ - public function call(string $method, string $path = '', array $headers = array(), array $params = array()): array|string + public function call(string $method, string $path = '', array $headers = array(), array $params = array()): array|string { $headers = array_merge($this->headers, $headers); $ch = curl_init((str_contains($path, 'http') ? $path : $this->endpoint . $path . (($method == 'GET' && !empty($params)) ? '?' . http_build_query($params) : ''))); @@ -217,7 +217,7 @@ public function call(string $method, string $path = '', array $headers = array() * * @param array $data * @param string $prefix - * @return array + * @return array */ protected function flatten(array $data, string $prefix = ''): array { $output = []; @@ -249,4 +249,4 @@ protected function logError(Exception $e) { Console::error('[Error] File: ' . $e->getFile()); Console::error('[Error] Line: ' . $e->getLine()); } -} \ No newline at end of file +}