TaskResult::getErrors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
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 9
    public function __construct()
18
    {
19 9
        $this->errors = [];
20 9
    }
21
22
    /**
23
     * @return bool
24
     */
25 9
    public function isSuccess()
26
    {
27 9
        return $this->success;
28
    }
29
30
    /**
31
     * @param bool $success
32
     * @return TaskResult
33
     */
34 9
    public function setSuccess($success)
35
    {
36 9
        $this->success = $success;
37 9
        return $this;
38
    }
39
40
    /**
41
     * @return array
42
     */
43 7
    public function getErrors()
44
    {
45 7
        return $this->errors;
46
    }
47
48
    /**
49
     * @param array $errors
50
     * @return TaskResult
51
     */
52 8
    public function setErrors(array $errors)
53
    {
54 8
        $this->errors = $errors;
55 8
        return $this;
56
    }
57
}
58