Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
11 | public function fill(array $params) |
||
12 | { |
||
13 | foreach ($params as $param => $value) { |
||
14 | $param = str_replace(' ', '', ucwords(str_replace('_', ' ', $param))); |
||
15 | if (method_exists($this, 'set' . ucwords($param))) { |
||
16 | $this->{'set' . ucwords($param)}($value); |
||
17 | } |
||
18 | } |
||
19 | return $this; |
||
20 | } |
||
33 |