diff --git a/src/Client/Endpoint/HighlightEndpoint.php b/src/Client/Endpoint/HighlightEndpoint.php index de094a2..c6381d4 100644 --- a/src/Client/Endpoint/HighlightEndpoint.php +++ b/src/Client/Endpoint/HighlightEndpoint.php @@ -27,7 +27,7 @@ class HighlightEndpoint extends AbstractEndpoint * * @throws Exception */ - public function latest(DateTime $day = null, string $league = null, string $sportQuery = null): array + public function latest(?DateTime $day = null, ?string $league = null, ?string $sportQuery = null): array { $filter = new HighlightFilter(); if ($day) { diff --git a/src/Client/Endpoint/ListEndpoint.php b/src/Client/Endpoint/ListEndpoint.php index d9cc153..29e8f46 100644 --- a/src/Client/Endpoint/ListEndpoint.php +++ b/src/Client/Endpoint/ListEndpoint.php @@ -53,7 +53,7 @@ public function countries(): array * * @throws Exception */ - public function leagues(string $countryQuery = null, string $sportQuery = null): array + public function leagues(?string $countryQuery = null, ?string $sportQuery = null): array { $endpoint = $countryQuery || $sportQuery ? self::ENDPOINT_SEARCH_LEAGUES : self::ENDPOINT_LEAGUES; @@ -170,7 +170,7 @@ public function teams(int $leagueID): array * @throws Exception */ public function teamsSearch( - string $leagueQuery = null, string $sportQuery = null, string $countryQuery = null): array + ?string $leagueQuery = null, ?string $sportQuery = null, ?string $countryQuery = null): array { $filter = new ListFilter(); if ($leagueQuery) { diff --git a/src/Client/Endpoint/LivescoreEndpoint.php b/src/Client/Endpoint/LivescoreEndpoint.php index 036ffc2..03f07d6 100644 --- a/src/Client/Endpoint/LivescoreEndpoint.php +++ b/src/Client/Endpoint/LivescoreEndpoint.php @@ -26,7 +26,7 @@ class LivescoreEndpoint extends AbstractEndpoint * * @throws Exception */ - public function now(string $sport = null, int $leagueID = null): array + public function now(?string $sport = null, ?int $leagueID = null): array { $filter = new LivescoreFilter(); if ($leagueID) { diff --git a/src/Client/Endpoint/LookupEndpoint.php b/src/Client/Endpoint/LookupEndpoint.php index cc222a5..2d01757 100644 --- a/src/Client/Endpoint/LookupEndpoint.php +++ b/src/Client/Endpoint/LookupEndpoint.php @@ -238,7 +238,7 @@ public function statistics(int $eventID): array * * @throws Exception */ - public function table(int $leagueID, string $season = null): ?Table + public function table(int $leagueID, ?string $season = null): ?Table { $filter = (new LookupFilter())->setLeagueID($leagueID); if ($season) { diff --git a/src/Client/Endpoint/ScheduleEndpoint.php b/src/Client/Endpoint/ScheduleEndpoint.php index 6d2b889..6384d04 100644 --- a/src/Client/Endpoint/ScheduleEndpoint.php +++ b/src/Client/Endpoint/ScheduleEndpoint.php @@ -35,7 +35,7 @@ class ScheduleEndpoint extends AbstractEndpoint * * @throws Exception */ - public function day(DateTime $day, string $sportQuery = null, string $leagueQuery = null): array + public function day(DateTime $day, ?string $sportQuery = null, ?string $leagueQuery = null): array { $filter = (new ScheduleFilter())->setDay($day); if ($sportQuery) { @@ -99,7 +99,7 @@ public function leagueLast(int $leagueID): array * * @throws Exception */ - public function round(int $leagueID, int $round, string $season = null): array + public function round(int $leagueID, int $round, ?string $season = null): array { $filter = (new ScheduleFilter())->setID($leagueID)->setRound($round); if ($season) { @@ -123,7 +123,7 @@ public function round(int $leagueID, int $round, string $season = null): array * * @throws Exception */ - public function season(int $leagueID, string $season = null): array + public function season(int $leagueID, ?string $season = null): array { $filter = (new ScheduleFilter())->setID($leagueID); if ($season) { @@ -184,7 +184,7 @@ public function teamLast(int $teamID): array * * @throws Exception */ - public function television(DateTime $day, string $sportQuery = null, string $countryQuery = null): array + public function television(DateTime $day, ?string $sportQuery = null, ?string $countryQuery = null): array { $filter = (new ScheduleFilter())->setDay($day); if ($sportQuery) { diff --git a/src/Client/Endpoint/SearchEndpoint.php b/src/Client/Endpoint/SearchEndpoint.php index b5ba93e..006d1d1 100644 --- a/src/Client/Endpoint/SearchEndpoint.php +++ b/src/Client/Endpoint/SearchEndpoint.php @@ -30,7 +30,7 @@ class SearchEndpoint extends AbstractEndpoint * * @throws Exception */ - public function events(string $eventQuery, string $season = null): array + public function events(string $eventQuery, ?string $season = null): array { $filter = (new SearchFilter())->setEventQuery($eventQuery); if ($season) { @@ -70,7 +70,7 @@ public function eventFile(string $file): ?Event * * @throws Exception */ - public function players(string $playerQuery = null, string $teamQuery = null): array + public function players(?string $playerQuery = null, ?string $teamQuery = null): array { $filter = new SearchFilter(); diff --git a/src/Config/Config.php b/src/Config/Config.php index c5b2efc..841e909 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -59,7 +59,7 @@ public function getRateLimiter(): ?LimiterInterface * * @return $this This configuration */ - public function setRateLimiter(LimiterInterface $rateLimiter = null): self + public function setRateLimiter(?LimiterInterface $rateLimiter = null): self { if (!$rateLimiter) { // Default rate limit of 100 requests per minute