| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function get(ReflectionClass $reflectionClass, callable $resolver, string $key = '', ?int $ttl = null) |
||
| 26 | { |
||
| 27 | $cacheKey = $reflectionClass->getName() . '__' . $key; |
||
| 28 | $item = $this->classBoundCache->get($cacheKey); |
||
| 29 | if ($item !== null) { |
||
| 30 | return $item; |
||
| 31 | } |
||
| 32 | |||
| 33 | $item = $resolver(); |
||
| 34 | |||
| 35 | $this->classBoundCache->set($cacheKey, $item, $reflectionClass, $ttl); |
||
| 36 | |||
| 37 | return $item; |
||
| 38 | } |
||
| 40 |