| Total Complexity | 6 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Coverage | 16.66% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Leagues extends Api |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @param string $leagueId |
||
| 10 | * @return array|[] |
||
|
|
|||
| 11 | * @throws SleeperException |
||
| 12 | */ |
||
| 13 | 1 | public function find(string $leagueId): array |
|
| 14 | { |
||
| 15 | 1 | return $this->get('league/' . $leagueId); |
|
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $userId |
||
| 20 | * @param string $season |
||
| 21 | * @param string[optional] $sport default is nfl |
||
| 22 | * @return array|[] |
||
| 23 | * @throws SleeperException |
||
| 24 | */ |
||
| 25 | public function byUser(string $userId, string $season, string $sport = 'nfl'): array |
||
| 26 | { |
||
| 27 | return $this->get('user/' . $userId . '/leagues/'. $sport .'/' . $season); |
||
| 28 | } |
||
| 29 | |||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $leagueId |
||
| 33 | * @param string $week |
||
| 34 | * @return array|[] |
||
| 35 | * @throws SleeperException |
||
| 36 | */ |
||
| 37 | public function matchups(string $userId, string $week): array |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string[optional] $sport default is nfl |
||
| 44 | * @return object |
||
| 45 | * @throws SleeperException |
||
| 46 | */ |
||
| 47 | public function state(string $sport = 'nfl'): array |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param string $leagueId |
||
| 54 | * @return array|[] |
||
| 55 | * @throws SleeperException |
||
| 56 | */ |
||
| 57 | public function users(string $leagueId): array |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $leagueId |
||
| 64 | * @return array|[] |
||
| 65 | * @throws SleeperException |
||
| 66 | */ |
||
| 67 | public function rosters(string $leagueId): array |
||
| 73 |