| 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 |
||
| 30 | 33 | public function get($action, $alt = "xml") |
|
| 31 | { |
||
| 32 | 33 | if (array_key_exists($action, $this->actions)) { |
|
| 33 | 30 | if (!in_array($alt, $this->actions[$action])) { |
|
| 34 | 3 | throw new \Exception("Invalid Format: ". $alt); |
|
| 35 | } |
||
| 36 | 27 | $response = $this->client->get('/'. strtolower(get_class($this)) .'/'.$this->name. '/' .$action, $alt); |
|
| 37 | 27 | return $response; |
|
| 38 | } else { |
||
| 39 | 3 | throw new \Exception("Invalid Action: ". $action); |
|
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 |