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