Skip to content

Commit

Permalink
phpstan errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramtamtam committed Dec 23, 2020
1 parent a2929d0 commit 2e693ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ protected function getDefaultUserAgent(): string
$user_agent = 'b2b-api-php/' . $this->getVersion();

if (\function_exists('curl_version') && \extension_loaded('curl')) {
$user_agent .= ' curl/' . (\curl_version()['version'] ?? 'UNKNOWN');
$user_agent .= ' curl/' . (((array) \curl_version())['version'] ?? 'UNKNOWN');
}

return $user_agent . ' PHP/' . PHP_VERSION;
Expand Down
2 changes: 1 addition & 1 deletion src/DateTimeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function createFromIso8601Zulu(string $time): DateTime

if (! $result instanceof DateTime) {
throw new InvalidArgumentException(
"Wrong time [$time] passed (" . \implode(',', DateTime::getLastErrors()['errors'] ?? []) . ')'
"Wrong time [$time] passed (" . \implode(',', ((array) DateTime::getLastErrors())['errors'] ?? []) . ')'
);
}

Expand Down

0 comments on commit 2e693ed

Please sign in to comment.