Skip to content

Commit

Permalink
Explicitly mark parameters as nullable (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Jamie Burchell <[email protected]>
  • Loading branch information
jamieburchell and Jamie Burchell authored Oct 9, 2024
1 parent 47d1efb commit cf8ead7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/BasePostcodesIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit cf8ead7

Please sign in to comment.