Conditions | 5 |
Paths | 5 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5.0187 |
Changes | 0 |
1 | <?php |
||
42 | 4 | public function getConfiguration($name = null) |
|
43 | { |
||
44 | 4 | if (empty($name)) { |
|
45 | 3 | return $this->getConfiguration('default'); |
|
46 | } |
||
47 | |||
48 | 4 | if (isset($this->configuration[$name])) { |
|
49 | 2 | return $this->configuration[$name]; |
|
50 | } |
||
51 | |||
52 | 2 | if ($name === 'default') { |
|
53 | 1 | $name = $this->getFirstName(); |
|
54 | 1 | if (isset($this->configuration[$name])) { |
|
55 | 1 | return $this->configuration[$name]; |
|
56 | } |
||
57 | } |
||
58 | 1 | } |
|
59 | |||
78 |