ArrayConfig   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A doGetAll() 0 4 1
A doSetAll() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of Fabrica.
5
 *
6
 * (c) Alexandre Salomé <[email protected]>
7
 * (c) Julien DIDIER <[email protected]>
8
 *
9
 * This source file is subject to the GPL license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Fabrica\Component\Config;
14
15
/**
16
 * Stores values locally in an array.
17
 *
18
 * @author Alexandre Salomé <[email protected]>
19
 */
20
class ArrayConfig extends AbstractConfig
21
{
22
    /**
23
     * @var array
24
     */
25
    private $values;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
26
27
    public function __construct(array $values)
28
    {
29
        $this->values = $values;
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function doGetAll()
36
    {
37
        return $this->values;
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43
    public function doSetAll(array $values)
44
    {
45
        $this->values = $values;
46
    }
47
}
48