Completed
Push — master ( 1d1341...11ab7e )
by Greg
01:30
created

ConfigAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 31
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setConfig() 0 6 1
A getConfig() 0 4 1
1
<?php
2
3
namespace Consolidation\Config;
4
5
trait ConfigAwareTrait
6
{
7
    /**
8
     * @var ConfigInterface
9
     */
10
    protected $config;
11
12
    /**
13
     * Set the config management object.
14
     *
15
     * @param ConfigInterface $config
16
     *
17
     * @return $this
18
     */
19
    public function setConfig(ConfigInterface $config)
20
    {
21
        $this->config = $config;
22
23
        return $this;
24
    }
25
26
    /**
27
     * Get the config management object.
28
     *
29
     * @return ConfigInterface
30
     */
31
    public function getConfig()
32
    {
33
        return $this->config;
34
    }
35
}
36