Skip to content
Snippets Groups Projects
Commit 8023b30b authored by Bastiaan Grutters's avatar Bastiaan Grutters
Browse files

Fix nullable parameters for PHP 8.4

parent 83e74546
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ class Client {
return $response['baseCurrencies'];
}
public function viewCoin(int $coinId, \DateTime $date = null, string $baseCurrency = 'USD'): Coin {
public function viewCoin(int $coinId, ?\DateTime $date = null, string $baseCurrency = 'USD'): Coin {
$response = $this->apiCall('viewCoin', [$coinId, $date, $baseCurrency]);
if (!isset($response['coin']) || !\is_array($response['coin'])) {
throw new ServerException('Invalid response for viewCoin, missing or invalid `coin`.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment