Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
34 | 4 | public function get($key) { |
|
35 | 4 | if (!isset($this->data[$key])) { |
|
36 | 1 | return null; |
|
37 | } |
||
38 | |||
39 | 4 | if (\is_scalar($this->data[$key])) { |
|
40 | 2 | return $this->data[$key]; |
|
41 | } |
||
42 | |||
43 | 3 | if (\is_array($this->data[$key])) { |
|
44 | 3 | return new FlexibleData($this->data[$key]); |
|
45 | } |
||
46 | |||
47 | 1 | return $this->data[$key]; |
|
48 | } |
||
113 |