Completed
Push — master ( fdad86...4add92 )
by Alessandro
08:39
created

PHPUnitOption::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
    public function __construct($name, $hasValue = true, $shortName = null)
30
    {
31
        $this->name = $name;
32
        $this->hasValue = $hasValue;
33
        $this->shortName = $shortName;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getName()
40
    {
41
        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
    public function setValue($value)
56
    {
57
        $this->value = $value;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getValue()
64
    {
65
        return $this->value;
66
    }
67
68
    /**
69
     * @return boolean
70
     */
71
    public function hasValue()
72
    {
73
        return $this->hasValue;
74
    }
75
}
76