| Conditions | 4 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 56 | public function toArray() |
||
| 57 | { |
||
| 58 | $data = []; |
||
| 59 | |||
| 60 | $properties = ['query', 'body', 'urlPrefix']; |
||
| 61 | foreach ($properties as $property) { |
||
| 62 | $value = $this->{$property}; |
||
| 63 | if (null !== $value) { |
||
| 64 | $data[$property] = $value; |
||
| 65 | } |
||
| 66 | } |
||
| 67 | |||
| 68 | if (null !== $this->matcher) { |
||
| 69 | $data['matcher'] = $this->matcher->toArray(); |
||
| 70 | } |
||
| 71 | |||
| 72 | return $data; |
||
| 73 | } |
||
| 74 | } |