| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 25 | 2 | public static function fromArray(array $data, $context = null) |
|
| 26 | { |
||
| 27 | 2 | $result = []; |
|
| 28 | 2 | foreach ($data as $key => $value) { |
|
| 29 | 1 | $parts = explode('.', $key, 2); |
|
| 30 | 1 | if ($parts[0] == 'searchKeywords') { |
|
| 31 | 1 | $result['searchKeywords'][$parts[1]] = $value; |
|
| 32 | } else { |
||
| 33 | 1 | $result[$key] = $value; |
|
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | 2 | return parent::fromArray($result, $context); |
|
| 38 | } |
||
| 39 | |||
| 54 |