Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
22 | 1 | public function apply($dataSource) |
|
23 | { |
||
24 | /** @var AddFieldOperation $operation */ |
||
25 | 1 | $operation = $this->operation; |
|
26 | 1 | foreach ($dataSource as $row) { |
|
27 | /** @var RowInterface $row */ |
||
28 | 1 | $row->dynamicFieldsRegistry()->add( |
|
29 | 1 | $operation->getFieldName(), |
|
30 | 1 | $operation->getCallable() |
|
31 | 1 | ); |
|
32 | 1 | return $dataSource; |
|
33 | } |
||
34 | } |
||
35 | } |
||
36 |