| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4.0466 |
| 1 | <?php |
||
| 24 | 2 | public function map($field, $context = null) |
|
| 25 | { |
||
| 26 | 2 | if ($context instanceof JsonDefinition && |
|
| 27 | 2 | $context->getField($field['fieldName']) instanceof DefinitionElementInterface |
|
| 28 | 2 | ) { |
|
| 29 | 2 | $fieldInformation = $context->getField($field['fieldName']) |
|
| 30 | 2 | ->getDefAsArray(); |
|
| 31 | |||
| 32 | // in this context, the default type is the doctrine type.. |
||
| 33 | 2 | if (isset($fieldInformation['doctrineType'])) { |
|
| 34 | 1 | $fieldInformation['type'] = $fieldInformation['doctrineType']; |
|
| 35 | 1 | } |
|
| 36 | |||
| 37 | 2 | $field = array_merge($field, $fieldInformation); |
|
| 38 | 2 | } |
|
| 39 | |||
| 40 | 2 | return $field; |
|
| 41 | } |
||
| 42 | } |
||
| 43 |