Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function convert($key, $value, $direction = Modifier::DIRECTION_TO) |
||
34 | { |
||
35 | $convertMethod = 'convert'.ucfirst($direction); |
||
36 | $canMethod = 'canHandle'.ucfirst($direction); |
||
37 | foreach ($this->items as $modifier) { |
||
38 | if ($modifier->$canMethod($value)) { |
||
39 | $this->keys[] = $key; |
||
40 | return $modifier->$convertMethod($value); |
||
41 | } |
||
42 | } |
||
43 | return $value; |
||
44 | } |
||
45 | } |
||
46 |