ShopwareCache::save()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 5
1
<?php
2
3
namespace TEiling\Scd16\Cache;
4
5
use Zend_Cache_Core;
6
7
class ShopwareCache implements CacheInterface
8
{
9
    /** @var Zend_Cache_Core */
10
    private $shopwareCache;
11
12
    /**
13
     * DummyCache constructor.
14
     *
15
     * @param Zend_Cache_Core $shopwareCache
16
     */
17
    public function __construct(Zend_Cache_Core $shopwareCache)
18
    {
19
        $this->shopwareCache = $shopwareCache;
20
    }
21
22
    /**
23
     * @inheritdoc
24
     */
25
    public function test($id)
26
    {
27
        return $this->shopwareCache->test($id);
28
    }
29
30
    /**
31
     * @inheritdoc
32
     * @throws \Zend_Cache_Exception
33
     */
34
    public function save($data, $id = null, $tags = [], $specificLifetime = null, $priority = 8)
35
    {
36
        return $this->shopwareCache->save($data, $id, $tags, $specificLifetime, $priority);
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42
    public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false)
43
    {
44
        return $this->shopwareCache->load($id, $doNotTestCacheValidity, $doNotUnserialize);
45
    }
46
}
47