| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function get(string $key, mixed $default = null): mixed |
||
| 32 | { |
||
| 33 | $value = $this->values[$key] ?? $default; |
||
| 34 | if(is_callable($value)) |
||
| 35 | { |
||
| 36 | $value = $value(); |
||
| 37 | // Save the value returned by the callback in the stash. |
||
| 38 | $this->values[$key] = $value; |
||
| 39 | } |
||
| 40 | |||
| 41 | return $value; |
||
| 42 | } |
||
| 44 |