Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public static function fromCache(CacheEntity $entity, string $prefix): self |
||
25 | { |
||
26 | $name = $prefix . '.' . $entity->name; |
||
27 | $value = Cache::store($entity->driver)->get($name, $entity->default); |
||
28 | |||
29 | if ($value === $entity->default) { |
||
30 | return self::make(CacheStatus::NOT_CREATED(), 0, $entity->default); |
||
31 | } |
||
32 | |||
33 | return $value; |
||
34 | } |
||
36 |