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.

NoStaleCacheEvent::getResult()   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 0
1
<?php
2
namespace Metaphore;
3
4
use Metaphore\Cache;
5
use Metaphore\Ttl;
6
7
class NoStaleCacheEvent
8
{
9
    protected $cache;
10
11
    protected $key;
12
13
    protected $cachedCallable;
14
15
    protected $ttl;
16
17
    protected $result = null;
18
19
    public function __construct(Cache $cache, $key, callable $cachedCallable, Ttl $ttl)
20
    {
21
        $this->cache = $cache;
22
        $this->key = $key;
23
        $this->cachedCallable = $cachedCallable;
24
        $this->ttl = $ttl;
25
    }
26
27
    /**
28
     * @return Cache
29
     */
30
    public function getCache()
31
    {
32
        return $this->cache;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getKey()
39
    {
40
        return $this->key;
41
    }
42
43
    /**
44
     * @return callable
45
     */
46
    public function getCachedCallable()
47
    {
48
        return $this->cachedCallable;
49
    }
50
51
    /**
52
     * @return Ttl
53
     */
54
    public function getTtl()
55
    {
56
        return $this->ttl;
57
    }
58
59
    public function setResult($result)
60
    {
61
        $this->result = $result;
62
    }
63
64
    public function hasResult()
65
    {
66
        return ($this->result !== null);
67
    }
68
69
    public function getResult()
70
    {
71
        return $this->result;
72
    }
73
}
74