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.

DoctrineCacheStorageAdapter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * 
4
 */
5
6
namespace Opensoft\Rollout\Storage;
7
8
use Doctrine\Common\Cache\Cache;
9
10
/**
11
 * Use any available doctrine/cache Cache implementation
12
 *
13
 * @author Richard Fullmer <[email protected]>
14
 */
15
class DoctrineCacheStorageAdapter implements StorageInterface
16
{
17
    /**
18
     * @var Cache
19
     */
20
    private $cache;
21
22
    /**
23
     * @param Cache $cache
24
     */
25
    public function __construct(Cache $cache)
26
    {
27
        $this->cache = $cache;
28
    }
29
30
    /**
31
     * @param  string $key
32
     * @return mixed|null Null if the value is not found
33
     */
34
    public function get($key)
35
    {
36
        return $this->cache->fetch($key);
37
    }
38
39
    /**
40
     * @param string $key
41
     * @param mixed $value
42
     */
43
    public function set($key, $value)
44
    {
45
        $this->cache->save($key, $value);
46
    }
47
48
    /**
49
     * @param string $key
50
     */
51
    public function remove($key)
52
    {
53
        $this->cache->delete($key);
54
    }
55
} 
56