ParameterCollection   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 32
ccs 0
cts 11
cp 0
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 2
A __construct() 0 3 1
A set() 0 3 1
1
<?php
2
3
namespace Deployee\Plugins\Deploy\Definitions\Parameter;
4
5
6
class ParameterCollection implements ParameterCollectionInterface
7
{
8
    /**
9
     * @var array
10
     */
11
    private $values;
12
13
    /**
14
     * ParameterCollection constructor.
15
     * @param array $values
16
     */
17
    public function __construct(array $values = [])
18
    {
19
        $this->values = $values;
20
    }
21
22
    /**
23
     * @param string $id
24
     * @param mixed $value
25
     */
26
    public function set($id, $value)
27
    {
28
        $this->values[$id] = $value;
29
    }
30
31
    /**
32
     * @param string $id
33
     * @return mixed
34
     */
35
    public function get($id)
36
    {
37
        return isset($this->values[$id]) ? $this->values[$id] : null;
38
    }
39
}