diff --git a/src/Resources/ApiResource.php b/src/Resources/ApiResource.php index 4ddf20c..41794a5 100644 --- a/src/Resources/ApiResource.php +++ b/src/Resources/ApiResource.php @@ -4,6 +4,7 @@ use CoinbaseCommerce\ApiClient; use CoinbaseCommerce\ApiResponse; use CoinbaseCommerce\Util; +use PhpOffice\PhpSpreadsheet\Worksheet\Iterator; class ApiResource extends \ArrayObject { @@ -122,12 +123,12 @@ public function __toString() return print_r($this->attributes, true); } - public static function setClient($client) + public static function setClient($client): void { self::$client = $client; } - protected static function getClient() + protected static function getClient(): mixed { if (self::$client) { return self::$client; @@ -136,37 +137,37 @@ protected static function getClient() return ApiClient::getInstance(); } - public function offsetGet($key) + public function offsetGet($key): mixed { return $this->__get($key); } - public function offsetSet($key, $value) + public function offsetSet($key, $value): void { null === $key ? array_push($this->attributes, $value) : $this->attributes[$key] = $value; } - public function count() + public function count(): int { return count($this->attributes); } - public function asort() + public function asort(int $flags=SORT_REGULAR): bool { asort($this->attributes); } - public function ksort() + public function ksort(int $flags=SORT_REGULAR): bool { ksort($this->attributes); } - public function offsetUnset($key) + public function offsetUnset($key): void { unset($this->attributes[$key]); } - public function getIterator() + public function getIterator(): Iterator { return new \ArrayIterator($this->attributes); }