| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | 87 | public function run(\Closure $closure, array $parameters = []) |
|
| 17 | { |
||
| 18 | // construct cachekey |
||
| 19 | 87 | $cachekey = $this->baseKey.':'.md5(implode('', $parameters)); |
|
| 20 | |||
| 21 | 87 | if (isset(static::$cache[$cachekey])) { |
|
| 22 | 65 | return static::$cache[$cachekey]; |
|
| 23 | } |
||
| 24 | |||
| 25 | 87 | return static::$cache[$cachekey] = call_user_func_array($closure, $parameters); |
|
| 26 | } |
||
| 33 |