| Conditions | 5 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | protected function convertProperty($property, $data, array $convertedItem, array $options) |
||
| 10 | { |
||
| 11 | switch ($property) { |
||
| 12 | case 'constraints': |
||
| 13 | $convertedItem['constraints'] = implode(',', array_keys($data)); |
||
| 14 | break; |
||
| 15 | |||
| 16 | case 'type_config': |
||
| 17 | foreach ($data as $key => $value) { |
||
| 18 | $convertedItem['type_config-'.$key] = is_array($value) ? json_encode($value) : (string) $value; |
||
| 19 | } |
||
| 20 | break; |
||
| 21 | |||
| 22 | default: |
||
| 23 | $convertedItem = parent::convertProperty($property, $data, $convertedItem, $options); |
||
| 24 | break; |
||
| 25 | } |
||
| 26 | |||
| 27 | return $convertedItem; |
||
| 28 | } |
||
| 30 |