Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 42 | public static function initialize($target, $parameters) |
|
22 | { |
||
23 | 42 | if (is_array($parameters)) { |
|
24 | 42 | foreach ($parameters as $key => $value) { |
|
25 | 36 | $method = 'set'.ucfirst(static::camelCase($key)); |
|
26 | 36 | if (method_exists($target, $method)) { |
|
27 | 36 | $target->$method($value); |
|
28 | 36 | } |
|
29 | 42 | } |
|
30 | 42 | } |
|
31 | 42 | } |
|
32 | |||
50 |