| Conditions | 6 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function convertFields($field, $booleanFields, $data, $convertedItem) |
||
| 27 | { |
||
| 28 | if (empty($field) || 'use_as_label' === $field) { |
||
| 29 | return $convertedItem; |
||
| 30 | } |
||
| 31 | if (empty($data)) { |
||
| 32 | return $convertedItem; |
||
| 33 | } |
||
| 34 | |||
| 35 | $convertedItem = parent::convertFields($field, $booleanFields, $data, $convertedItem); |
||
| 36 | |||
| 37 | if ('type' === $field) { |
||
| 38 | $pimType = $this->attributeTypesMapper->getMappedValue($data); |
||
| 39 | if (null !== $pimType) { |
||
| 40 | $convertedItem['attribute_type'] = $pimType; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | return $convertedItem; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |