AbstractConfigurationHandler::setKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Habu\ComposerScriptUtils\Configuration;
4
5
use Habu\ComposerScriptUtils\Interfaces\ConfigurationHandlerInterface;
6
7
/**
8
 * Class AbstractConfigurationHandler.
9
 *
10
 * @author Ruben Knol <[email protected]>
11
 */
12
abstract class AbstractConfigurationHandler implements ConfigurationHandlerInterface
13
{
14
    /**
15
     * @var string
16
     */
17
    private $key;
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 9
    public function setKey($key)
23
    {
24 9
        $this->key = $key;
25 9
    }
26
27
    /**
28
     * @return string
29
     */
30 8
    protected function getKey()
31
    {
32 8
        return $this->key;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    abstract public function get($value);
39
}
40