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 — 3.x ( 854d93...81f322 )
by Jindřich
01:52
created

ArrayCache::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Skautis\Wsdl\Decorator\Cache;
5
6
/**
7
 * Cache v ramci jednoho requestu
8
 */
9
class ArrayCache implements CacheInterface
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $data = [];
15
16
    /**
17
     * @inheritdoc
18
     */
19 3
    public function get(string $key)
20
    {
21 3
        if (array_key_exists($key, $this->data)) {
22 3
            return $this->data[$key];
23
        }
24
25 1
        return null;
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31 3
    public function set(string $key, $value): void
32
    {
33 3
        $this->data[$key] = $value;
34 3
    }
35
}
36