diff --git a/src/Core/BasePostcodesIO.php b/src/Core/BasePostcodesIO.php index ce4801a..c723d60 100644 --- a/src/Core/BasePostcodesIO.php +++ b/src/Core/BasePostcodesIO.php @@ -72,7 +72,7 @@ public function find($postcode) * @throws Jabranr\PostcodesIO\Exception\MalformedJsonException * @return stdClass */ - protected function get($endpoint, array $query = null) + protected function get($endpoint, ?array $query = null) { $uri = $this->getApiUri($endpoint, $query); $response = file_get_contents($uri); @@ -146,7 +146,7 @@ protected function post($endpoint, array $data) * @param array $query * @return string */ - public function getApiUri($endpoint, array $query = null) + public function getApiUri($endpoint, ?array $query = null) { $uri = sprintf('%s/%s', BasePostcodesIO::API_URI, $this->trimClean($endpoint));