Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
34 | 1 | public function process($item, callable $next) |
|
35 | { |
||
36 | 1 | $accessor = new PropertyAccessor(); |
|
37 | |||
38 | 1 | foreach ($this->converters as $property => $converters) { |
|
39 | 1 | foreach ($converters as $converter) { |
|
40 | 1 | $orgValue = $accessor->getValue($item, $property); |
|
41 | 1 | $value = call_user_func($converter, $orgValue); |
|
42 | 1 | $accessor->setValue($item, $property, $value); |
|
43 | 1 | } |
|
44 | 1 | } |
|
45 | |||
46 | 1 | return $next($item); |
|
47 | } |
||
48 | } |
||
49 |