Completed
Pull Request — master (#57)
by Alessandro
08:28
created

PHPUnitOption   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 67
ccs 14
cts 16
cp 0.875
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A getShortName() 0 4 1
A setValue() 0 4 1
A getValue() 0 4 1
A hasValue() 0 4 1
1
<?php
2
3
namespace Paraunit\Configuration;
4
5
/**
6
 * Class PHPUnitOption
7
 * @package Paraunit\Configuration
8
 */
9
class PHPUnitOption
10
{
11
    /** @var string */
12
    private $name;
13
    
14
    /** @var string */
15
    private $shortName;
16
    
17
    /** @var string */
18
    private $value;
19
    
20
    /** @var bool */
21
    private $hasValue;
22
23
    /**
24
     * PHPUnitOption constructor.
25
     * @param string $name
26
     * @param bool $hasValue
27
     * @param string | null $shortName
28
     */
29 1
    public function __construct($name, $hasValue = true, $shortName = null)
30
    {
31 1
        $this->name = $name;
32 1
        $this->hasValue = $hasValue;
33 1
        $this->shortName = $shortName;
34 1
    }
35
36
    /**
37
     * @return string
38
     */
39 1
    public function getName()
40
    {
41 1
        return $this->name;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getShortName()
48
    {
49
        return $this->shortName;
50
    }
51
52
    /**
53
     * @param string $value
54
     */
55 1
    public function setValue($value)
56
    {
57 1
        $this->value = $value;
58 1
    }
59
60
    /**
61
     * @return string
62
     */
63 1
    public function getValue()
64
    {
65 1
        return $this->value;
66
    }
67
68
    /**
69
     * @return boolean
70
     */
71 1
    public function hasValue()
72
    {
73 1
        return $this->hasValue;
74
    }
75
}
76