Conditions | 5 |
Paths | 16 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 3 |
Ratio | 17.65 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function create(array $options) |
||
21 | { |
||
22 | $params = array(); |
||
23 | $params['media_url'] = $options['media_url']; |
||
24 | $params['label'] = isset($options['label']) ? $options['label'] : ''; |
||
25 | $params['source'] = isset($options['source']) ? $options['source'] : ''; |
||
26 | $params['audio_channel'] = isset($options['audio_channel']) ? $options['audio_channel'] : ''; |
||
27 | View Code Duplication | if (!in_array($params['audio_channel'], array('left', 'right', 'split', ''))) { |
|
28 | throw new InvalidEnumTypeException(); |
||
29 | } |
||
30 | |||
31 | $resourceURI = $this->getSubresourceURI($options['id']); |
||
32 | $result = $this->client->post($resourceURI, $params); |
||
33 | $this->detail = $this->client->detail; |
||
34 | |||
35 | return $result; |
||
36 | } |
||
37 | } |
||
38 |