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

PHPUnitOption::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 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