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 ( 83458a...bda6f6 )
by Adam
05:56
created

CacheItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace Chief\Decorators;
4
5
use Psr\Cache\CacheItemInterface;
6
7
class CacheItem implements CacheItemInterface
8
{
9
    /**
10
     * @var
11
     */
12
    private $key;
13
    /**
14
     * @var
15
     */
16
    private $value;
17
    /**
18
     * @var int
19
     */
20
    private $expiresAfter;
21
22
    /**
23
     * @param $key
24
     *  The cache item key.
25
     *
26
     * @param $value
27
     *  The value to cache.
28
     *
29
     * @param int $expiresAfter
30
     *  The period of time from the present after which the item MUST be considered
31
     *  expired. An integer parameter is understood to be the time in seconds until
32
     *  expiration.
33
     */
34
    public function __construct($key, $value, $expiresAfter)
35
    {
36
37
        $this->key = $key;
38
        $this->value = $value;
39
        $this->expiresAfter = $expiresAfter;
40
    }
41
42
    /**
43
     * @inheritdoc
44
     */
45
    public function getKey()
46
    {
47
        return $this->key;
48
    }
49
50
    /**
51
     * @inheritdoc
52
     */
53
    public function get()
54
    {
55
        return $this->value;
56
    }
57
58
    /**
59
     * @inheritdoc
60
     */
61
    public function isHit()
62
    {
63
        return false;
64
    }
65
66
    /**
67
     * @inheritdoc
68
     */
69
    public function set($value)
70
    {
71
        $this->value = $value;
72
    }
73
74
    /**
75
     * @inheritdoc
76
     */
77
    public function expiresAt($expiration)
78
    {
79
        return null;
80
    }
81
82
    /**
83
     * @inheritdoc
84
     */
85
    public function expiresAfter($time)
86
    {
87
        return $this->expiresAfter;
88
    }
89
}