Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 0 | Features | 3 |
1 | <?php |
||
28 | 15 | public function set(Preview $preview, $expiresAt = null) |
|
29 | { |
||
30 | 15 | $item = $this->pool->getItem(md5($preview->url)); |
|
31 | |||
32 | 15 | $item->set(serialize($preview)); |
|
33 | |||
34 | 15 | $item->expiresAt($this->getExpireTime($expiresAt)); |
|
35 | |||
36 | 15 | $this->pool->save($item); |
|
37 | |||
38 | 15 | return $item; |
|
39 | } |
||
40 | |||
68 |