Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
32 | 19 | protected function setProperty($name, $value) |
|
33 | { |
||
34 | 19 | $methodName = 'set'.$this->strToStudlyCase($name); |
|
35 | 19 | if (method_exists($this, $methodName)) { |
|
36 | 18 | $this->{$methodName}($value); |
|
37 | |||
38 | 8 | return; |
|
39 | } |
||
40 | |||
41 | 4 | if (array_key_exists($name, $this->properties)) { |
|
42 | 4 | $this->properties[$name] = $value; |
|
43 | |||
44 | 4 | return; |
|
45 | } |
||
68 |