Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class SleeperClient { |
||
8 | private $client; |
||
9 | |||
10 | 17 | public function __construct($mock = NULL) |
|
11 | { |
||
12 | 17 | $this->client = new Client($mock); |
|
13 | 17 | } |
|
14 | |||
15 | /** |
||
16 | * @param string $method |
||
17 | * @param string $parameters |
||
18 | * |
||
19 | * @method class avatars() retrieves avatar images for users and leagues |
||
20 | * @method class drafts() retrieves all drafts by a user or league |
||
21 | * @method class leagues() retrieves all leagues |
||
22 | * @method class players() retrieves all players |
||
23 | * @method class users() retrieve user object by name or id |
||
24 | * |
||
25 | * @throws BadMethodCallException |
||
26 | */ |
||
27 | 17 | public function __call($method, array $parameters = []) |
|
28 | { |
||
29 | 17 | return $this->getApiInstance($method); |
|
30 | } |
||
31 | |||
32 | 17 | protected function getApiInstance($method): object |
|
40 | } |
||
41 | |||
42 | } |
||
43 |