GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 2f12c3...e53ef5 )
by Hilari
02:46
created

CacheDecorator::demand()   A

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 1
1
<?php
2
3
namespace Cmp\Cache\Application;
4
5
use Cmp\Cache\Domain\Cache;
6
7
/**
8
 * Class CacheDecorator
9
 *
10
 * @package Cmp\Cache\Infrastureture
11
 */
12
abstract class CacheDecorator implements Cache
13
{
14
    /**
15
     * The decorated cache
16
     *
17
     * @var Cache
18
     */
19
    private $cache;
20
21
    /**
22
     * CacheDecorator constructor.
23
     *
24
     * @param Cache $cache
25
     */
26
    public function __construct(Cache $cache)
27
    {
28
        $this->cache = $cache;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function set($key, $value, $timeToLive = 0)
35
    {
36
        $this->cache->set($key, $value, $timeToLive);
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function has($key)
43
    {
44
        return $this->cache->has($key);
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function get($key, $default = null)
51
    {
52
        return $this->cache->get($key, $default);
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function demand($key)
59
    {
60
        return $this->cache->demand($key);
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function delete($key)
67
    {
68
        $this->cache->delete($key);
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function flush()
75
    {
76
        $this->cache->flush();
77
    }
78
}
79