Test Failed
Pull Request — master (#7)
by Jim
03:47
created

TaskResult::isSuccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Jarobe\TaskRunnerBundle\Model;
4
5
class TaskResult
6
{
7
    /**
8
     * @var bool
9
     */
10
    private $success;
11
12
    /**
13
     * @var array
14
     */
15
    private $errors;
16
17 4
    public function __construct()
18
    {
19 4
        $this->errors = [];
20 4
    }
21
22
    /**
23
     * @return bool
24
     */
25 4
    public function isSuccess()
26
    {
27 4
        return $this->success;
28
    }
29
30
    /**
31
     * @param bool $success
32
     * @return TaskResult
33
     */
34 4
    public function setSuccess($success)
35
    {
36 4
        $this->success = $success;
37 4
        return $this;
38
    }
39
40
    /**
41
     * @return array
42
     */
43 2
    public function getErrors()
44
    {
45 2
        return $this->errors;
46
    }
47
48
    /**
49
     * @param array $errors
50
     * @return TaskResult
51
     */
52 4
    public function setErrors(array $errors)
53
    {
54 4
        $this->errors = $errors;
55 4
        return $this;
56
    }
57
}
58