Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
47 | public function toArray() : array |
||
48 | { |
||
49 | $result = [ |
||
50 | 'description' => $this->description, |
||
51 | ]; |
||
52 | |||
53 | foreach ($this->headers as $value) { |
||
54 | $result['headers'][$value->name] = $value->toArray(); |
||
55 | } |
||
56 | |||
57 | foreach ($this->content as $value) { |
||
58 | $result['content'][$value->mediaType] = $value->toArray(); |
||
59 | } |
||
60 | |||
61 | return $result; |
||
62 | } |
||
64 |