for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @file
* Contains \TheSportsDb\Entity\Repository\LeagueRepository.
*/
namespace TheSportsDb\Entity\Repository;
* The default LeagueRepository implementation.
*
* @author Jelle Sebreghts
class LeagueRepository extends Repository implements LeagueRepositoryInterface {
* {@inheritdoc}
protected $entityType = 'league';
public function all() {
return $this->normalizeArray($this->sportsDbClient->doRequest('all_leagues.php')->leagues);
}
public function byCountry($country) {
return $this->normalizeArray($this->sportsDbClient->doRequest('search_all_leagues.php', array('c' => $country))->countrys);
public function byCountryAndSport($country, $sport) {
return $this->normalizeArray($this->sportsDbClient->doRequest('search_all_leagues.php', array('c' => $country, 's' => $sport))->countrys);
public function bySport($sport) {
return $this->normalizeArray($this->sportsDbClient->doRequest('search_all_leagues.php', array('s' => $sport))->countrys);