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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 27
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 2
A set() 0 4 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