| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class Memoize |
||
| 8 | { |
||
| 9 | public static $cache = []; |
||
| 10 | |||
| 11 | private $baseKey; |
||
| 12 | |||
| 13 | public function __construct($baseKey) |
||
| 14 | { |
||
| 15 | $this->baseKey = $baseKey; |
||
| 16 | } |
||
| 17 | |||
| 18 | public function run(\Closure $closure, array $parameters = []) |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function clear() |
||
| 32 | { |
||
| 33 | static::$cache = []; |
||
| 34 | } |
||
| 35 | |||
| 36 | private function convertToCachableParameters(array $parameters) |
||
| 43 | } |
||
| 44 | } |
||
| 45 |