Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 33 | public function get($action, $alt = "xml") |
|
33 | { |
||
34 | 33 | if (array_key_exists($action, $this->actions)) { |
|
35 | 30 | if (!in_array($alt, $this->actions[$action])) { |
|
36 | 3 | throw new \Exception("Invalid Format: ". $alt); |
|
37 | } |
||
38 | 27 | $response = $this->client->get('/'. strtolower(get_class($this)) .'/'.$this->name. '/' .$action, $alt); |
|
39 | 27 | return $response; |
|
40 | } else { |
||
41 | 3 | throw new \Exception("Invalid Action: ". $action); |
|
42 | } |
||
43 | } |
||
44 | } |
||
45 |