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

FakeAdapter   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 33
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A set() 0 4 1
A has() 0 4 1
A get() 0 4 1
1
<?php
2
3
namespace Skautis\SessionAdapter;
4
5
/**
6
 * Nepersestinenti adapter - vhodne jako stub pro testy nebo kdyz neni potreba ukladat
7
 */
8
class FakeAdapter implements AdapterInterface
9
{
10
    /**
11
     * Inmemory storage
12
     *
13
     * @var array
14
     */
15
    protected $data = [];
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function set($name, $object)
21
    {
22
        $this->data[$name] = $object;
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function has($name)
29
    {
30
        return isset($this->data[$name]);
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    public function get($name)
37
    {
38
        return $this->data[$name];
39
    }
40
}
41