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
Pull Request — 2.x (#64)
by Jindřich
07:10
created

ArrayCache   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 2
A set() 0 4 1
1
<?php
2
3
namespace Skautis\Wsdl\Decorator\Cache;
4
5
/**
6
 * Cache v ramci jednoho requestu
7
 */
8
class ArrayCache implements CacheInterface
9
{
10
    /**
11
     * @var array
12
     */
13
    protected $data = [];
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function get($key)
19
    {
20
        if (array_key_exists($key, $this->data)) {
21
            return $this->data[$key];
22
        }
23
24
        return null;
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function set($key, $value)
31
    {
32
        $this->data[$key] = $value;
33
    }
34
}
35