Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 1 | public function create(Classroom $classroom) |
|
22 | { |
||
23 | 1 | $response = $this->gateway->sendRequest(new Request\Create($classroom)); |
|
24 | |||
25 | 1 | $presenters = []; |
|
26 | 1 | foreach ($response->create[0]->class_details[0]->presenter_list[0] as $presenter) { |
|
27 | 1 | $presenters[] = [ |
|
28 | 1 | 'email' => (string)$presenter->presenter_email, |
|
29 | 1 | 'url' => (string)$presenter->presenter_url, |
|
30 | ]; |
||
31 | 1 | } |
|
32 | |||
33 | return [ |
||
34 | 1 | 'class_id' => (int)$response->create[0]->class_details[0]->class_id, |
|
35 | 1 | 'recording_url' => (string)$response->create[0]->class_details[0]->recording_url, |
|
36 | 'presenters' => $presenters |
||
37 | 1 | ]; |
|
38 | } |
||
39 | } |
||
40 |