Completed
Push — master ( 6b2d7c...9b8114 )
by Nils
02:18
created

Result::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace whm\Smoke\Rules;
4
5
class Result
6
{
7
    const STATUS_SUCCESS = 'success';
8
    const STATUS_FAILURE = 'failure';
9
10
    private $status;
11
    private $value;
12
    private $message;
13
    private $attributes = array();
14
15
    /**
16
     * Result constructor.
17
     *
18
     * @param $status
19
     * @param $value
20
     * @param $message
21
     */
22
    public function __construct($status, $message = '', $value = null)
23
    {
24
        $this->status = $status;
25
        $this->value = $value;
26
        $this->message = $message;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function getAttributes()
33
    {
34
        return $this->attributes;
35
    }
36
37
    /**
38
     * @param array $attributes
39
     */
40
    public function setAttributes($attributes)
41
    {
42
        $this->attributes = $attributes;
43
    }
44
45
    /**
46
     * @return mixed
47
     */
48
    public function getStatus()
49
    {
50
        return $this->status;
51
    }
52
53
    /**
54
     * @return mixed
55
     */
56
    public function getValue()
57
    {
58
        return $this->value;
59
    }
60
61
    /**
62
     * @return mixed
63
     */
64
    public function getMessage()
65
    {
66
        return $this->message;
67
    }
68
}
69