| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 40 | 2 | public function toArray() |
|
| 41 | { |
||
| 42 | 2 | $data = parent::toArray(); |
|
| 43 | |||
| 44 | 2 | if (isset($data['searchKeywords']) && is_array($data['searchKeywords'])) { |
|
| 45 | 1 | foreach ($data['searchKeywords'] as $locale => $keywords) { |
|
| 46 | 1 | $data['searchKeywords.' . $locale] = $keywords; |
|
| 47 | } |
||
| 48 | 1 | unset($data['searchKeywords']); |
|
| 49 | } |
||
| 50 | |||
| 51 | 2 | return $data; |
|
| 52 | } |
||
| 53 | } |
||
| 54 |