Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 2 | public function apply(array $rowData, array &$transformedData, array $options = []) |
|
22 | 2 | { |
|
23 | if (!is_array($options['field'])) { |
||
24 | $options['field'] = [$options['field']]; |
||
25 | 2 | } |
|
26 | 2 | ||
27 | 2 | $fields = []; |
|
28 | foreach ($options['field'] as $field) { |
||
29 | $fields[] = AssociativeArray::getFromKey($rowData, '@column.' . $field, $field, '.'); |
||
30 | 2 | } |
|
31 | |||
32 | return AssociativeArray::getFromKey($rowData, $fields); |
||
33 | } |
||
51 |