Skip to content

Commit

Permalink
Fix implicit nullables
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Dec 28, 2024
1 parent a5e28e4 commit fbf2d43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/GaletteMaps/Controllers/MapsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/GaletteMaps/NominatimTowns.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(Preferences $preferences)
*
* @return array<int, array<string, string>>
*/
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(
Expand Down

0 comments on commit fbf2d43

Please sign in to comment.