Currently when the summoner name is empty, the error you get says nothing about the actual issue.
$api->getSummonerByName('');
// Will throw an RiotAPI\LeagueAPI\Exceptions\ForbiddenException with the message "LeagueAPI: Forbidden. Forbidden"
After this change it is clear that the user has done something wrong:
$api->getSummonerByName('');
// Will throw an \RiotAPI\LeagueAPI\Exceptions\RequestParameterException with the message "Provided summoner name must not be empty"
Such checks are already made in several other methods for the tournerment API, like \RiotAPI\LeagueAPI\LeagueAPI::createTournament.
If this check was there before I would've saved a bit of time debugging. I actually thought my API token was wrong or invalid the whole time 🙈.
Currently when the summoner name is empty, the error you get says nothing about the actual issue.
After this change it is clear that the user has done something wrong:
Such checks are already made in several other methods for the tournerment API, like
\RiotAPI\LeagueAPI\LeagueAPI::createTournament
.If this check was there before I would've saved a bit of time debugging. I actually thought my API token was wrong or invalid the whole time 🙈.