Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected issues #4

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Analytics/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract public function getName(): string;
/**
* Global Headers
*
* @var array
* @var array<mixed>
*/
protected $headers = [
'Content-Type' => '',
Expand Down Expand Up @@ -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<mixed>|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) : '')));
Expand Down Expand Up @@ -217,7 +217,7 @@ public function call(string $method, string $path = '', array $headers = array()
*
* @param array $data
* @param string $prefix
* @return array
* @return array<mixed>
*/
protected function flatten(array $data, string $prefix = ''): array {
$output = [];
Expand Down Expand Up @@ -249,4 +249,4 @@ protected function logError(Exception $e) {
Console::error('[Error] File: ' . $e->getFile());
Console::error('[Error] Line: ' . $e->getLine());
}
}
}