Completed
Push — master ( 1e4e4c...8be129 )
by Marin
05:19
created

DeployStep::setIsMandatory()   A

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 Anorgan\Deployer\Common;
4
5
use Anorgan\Deployer\Common\Server\AbstractServer;
6
7
class DeployStep
8
{
9
    private $title;
10
    private $commands;
11
    private $servers;
12
    private $path        = null;
13
    private $isMandatory = true;
14
15 8
    public function __construct($title, $commands, array $servers)
16
    {
17 8
        $this->title = $title;
18 8
        $this->setCommands($commands);
19 8
        $this->setServers($servers);
20 8
    }
21
22 2
    public function getTitle()
23
    {
24 2
        return $this->title;
25
    }
26
27 8
    public function setCommands(array $commands)
28
    {
29 8
        $this->commands = $commands;
30 8
    }
31
32 2
    public function getCommands()
33
    {
34 2
        return $this->commands;
35
    }
36
37
    /**
38
     * @return AbstractServer[]
39
     */
40 2
    public function getServers()
41
    {
42 2
        return $this->servers;
43
    }
44
45
    /**
46
     * @param array $servers
47
     */
48 8
    public function setServers(array $servers)
49
    {
50 8
        $this->servers = $servers;
51 8
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getPath()
57
    {
58
        return $this->path;
59
    }
60
61
    /**
62
     * @param string $path
63
     */
64
    public function setPath($path)
65
    {
66
        $this->path = $path;
67
    }
68
69
    /**
70
     * @return bool
71
     */
72 3
    public function isMandatory()
73
    {
74 3
        return $this->isMandatory;
75
    }
76
77
    /**
78
     * @param bool $isMandatory
79
     */
80 1
    public function setIsMandatory($isMandatory)
81
    {
82 1
        $this->isMandatory = $isMandatory;
83 1
    }
84
}
85