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.

ArrayStorage   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 35
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 2
A set() 0 4 1
A remove() 0 6 2
1
<?php
2
/**
3
 * 
4
 */
5
6
namespace Opensoft\Rollout\Storage;
7
8
/**
9
 * @author Richard Fullmer <[email protected]>
10
 */
11
class ArrayStorage implements StorageInterface
12
{
13
    /**
14
     * @var array
15
     */
16
    private $storage = array();
17
18
    /**
19
     * @param string $key
20
     * @return mixed|null
21
     */
22
    public function get($key)
23
    {
24
        return isset($this->storage[$key]) ? $this->storage[$key] : null;
25
    }
26
27
    /**
28
     * @param string $key
29
     * @param mixed $value
30
     */
31
    public function set($key, $value)
32
    {
33
        $this->storage[$key] = $value;
34
    }
35
36
    /**
37
     * @param string $key
38
     */
39
    public function remove($key)
40
    {
41
        if (isset($this->storage[$key])) {
42
            unset($this->storage[$key]);
43
        }
44
    }
45
} 
46