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 ( 70c46b...316b2b )
by Hilari
02:09
created

CacheDecorator   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 59
rs 10

6 Methods

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