TaskDefinition::getType()   A
last analyzed

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
/**
4
 * This file is part of Bldr.io
5
 *
6
 * (c) Aaron Scherer <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE
10
 */
11
12
namespace Bldr\Definition;
13
14
/**
15
 * This is the model that the task configuration is turned in to.
16
 *
17
 * @author Aaron Scherer <[email protected]>
18
 */
19
class TaskDefinition
20
{
21
    /**
22
     * @var string $type
23
     */
24
    private $type;
25
26
    /**
27
     * @var array $parameters
28
     */
29
    private $parameters;
30
31
    /**
32
     * @var bool $continueOnError
33
     */
34
    private $continueOnError = false;
35
36
    /**
37
     * @param string $type
38
     */
39
    public function __construct($type)
40
    {
41
        $this->type = $type;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getType()
48
    {
49
        return $this->type;
50
    }
51
52
    /**
53
     * @return array
54
     */
55
    public function getParameters()
56
    {
57
        return $this->parameters;
58
    }
59
60
    /**
61
     * @param array $parameters
62
     *
63
     * @return TaskDefinition
64
     */
65
    public function setParameters($parameters)
66
    {
67
        $this->parameters = $parameters;
68
69
        return $this;
70
    }
71
72
    /**
73
     * @return boolean
74
     */
75
    public function continueOnError()
76
    {
77
        return $this->continueOnError;
78
    }
79
80
    /**
81
     * @param boolean $continueOnError
82
     *
83
     * @return TaskDefinition
84
     */
85
    public function setContinueOnError($continueOnError)
86
    {
87
        $this->continueOnError = $continueOnError;
88
89
        return $this;
90
    }
91
}
92