Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 0 |
1 | <?php |
||
12 | 21 | public function getProperty($name) |
|
13 | { |
||
14 | 21 | $methodName = 'get'.$this->strToStudlyCase($name); |
|
15 | 21 | if (method_exists($this, $methodName)) { |
|
16 | return $this->{$methodName}(); |
||
17 | } |
||
18 | |||
19 | 21 | if (array_key_exists($name, $this->properties)) { |
|
20 | 17 | return $this->properties[$name]; |
|
21 | } |
||
22 | |||
23 | 9 | if (array_key_exists($name, $this->readonlyProperties)) { |
|
24 | 8 | return $this->readonlyProperties[$name]; |
|
25 | } |
||
68 |