| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function get($key) |
||
| 15 | { |
||
| 16 | if (!isset($this->data[$key])) { |
||
| 17 | throw new \InvalidArgumentException(sprintf('Key "%s" is not defined.', $key)); |
||
| 18 | } |
||
| 19 | |||
| 20 | $value = $this->data[$key]; |
||
| 21 | if (is_callable($value)) { |
||
| 22 | $value = call_user_func_array($value, [$this]); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $value; |
||
| 26 | } |
||
| 27 | |||
| 39 | } |