| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 19 | protected function setProperty($name, $value) |
|
| 29 | { |
||
| 30 | 19 | $methodName = 'set'.$this->strToStudlyCase($name); |
|
| 31 | 19 | if (method_exists($this, $methodName)) { |
|
| 32 | 18 | $this->{$methodName}($value); |
|
| 33 | |||
| 34 | 8 | return; |
|
| 35 | } |
||
| 36 | |||
| 37 | 4 | if (property_exists($this, $name)) { |
|
| 38 | 4 | $this->{$name} = $value; |
|
| 39 | |||
| 40 | 4 | return; |
|
| 41 | } |
||
| 64 |