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.

Properties   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 36
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getProperty() 0 8 2
A setProperty() 0 6 1
1
<?php
2
/**
3
 * @link https://github.com/old-town/old-town-workflow
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\Util\Properties;
7
8
/**
9
 * Interface PropertiesInterface
10
 *
11
 * @package OldTown\Workflow\Util\Properties
12
 */
13
class  Properties implements PropertiesInterface
14
{
15
    /**
16
     * @var array
17
     */
18
    protected $storage = [];
19
20
    /**
21
     * @param string       $key
22
     * @param null|string  $defaultValue
23
     *
24
     * @return mixed
25
     */
26 39
    public function getProperty($key, $defaultValue = null)
27
    {
28 39
        if (array_key_exists($key, $this->storage)) {
29 36
            return $this->storage[$key];
30
        }
31
32 12
        return $defaultValue;
33
    }
34
35
36
    /**
37
     * @param string $key
38
     * @param string $value
39
     *
40
     * @return $this
41
     */
42 36
    public function setProperty($key, $value)
43
    {
44 36
        $this->storage[$key] = $value;
45
46 36
        return $this;
47
    }
48
}
49