diff --git a/lib/GaletteMaps/Controllers/MapsController.php b/lib/GaletteMaps/Controllers/MapsController.php index 72e5de1..51f29fe 100644 --- a/lib/GaletteMaps/Controllers/MapsController.php +++ b/lib/GaletteMaps/Controllers/MapsController.php @@ -104,7 +104,7 @@ public function map(Request $request, Response $response): Response * * @return Response */ - public function localizeMember(Request $request, Response $response, int $id = null): Response + public function localizeMember(Request $request, Response $response, ?int $id = null): Response { if ($id === null) { $id = (int)$this->login->id; @@ -193,7 +193,7 @@ public function localizeMember(Request $request, Response $response, int $id = n * * @return Response */ - public function ILiveHere(Request $request, Response $response, int $id = null): Response + public function ILiveHere(Request $request, Response $response, ?int $id = null): Response { $error = null; $message = null; diff --git a/lib/GaletteMaps/NominatimTowns.php b/lib/GaletteMaps/NominatimTowns.php index 3e23543..fa36853 100644 --- a/lib/GaletteMaps/NominatimTowns.php +++ b/lib/GaletteMaps/NominatimTowns.php @@ -63,7 +63,7 @@ public function __construct(Preferences $preferences) * * @return array> */ - public function search(string $town, string $country = null): array + public function search(string $town, ?string $country = null): array { if (!$town || trim($town) === '') { throw new \RuntimeException(