Completed
Push — master ( 9b8114...2ed294 )
by Nils
02:31
created

CheckResult   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 102
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 0
dl 0
loc 102
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getAttributes() 0 4 1
A setAttributes() 0 4 1
A getStatus() 0 4 1
A getValue() 0 4 1
A getMessage() 0 4 1
A getResponse() 0 4 1
A setResponse() 0 4 1
A getRuleName() 0 4 1
A setRuleName() 0 4 1
1
<?php
2
3
namespace whm\Smoke\Rules;
4
5
use whm\Smoke\Http\Response;
6
7
class CheckResult
8
{
9
    const STATUS_SUCCESS = 'success';
10
    const STATUS_FAILURE = 'failure';
11
12
    private $status;
13
    private $value;
14
    private $message;
15
    private $attributes = array();
16
    private $ruleName;
17
18
    /**
19
     * @var Response
20
     */
21
    private $response;
22
23
    /**
24
     * Result constructor.
25
     *
26
     * @param $status
27
     * @param $value
28
     * @param $message
29
     */
30
    public function __construct($status, $message = '', $value = null)
31
    {
32
        $this->status = $status;
33
        $this->value = $value;
34
        $this->message = $message;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getAttributes()
41
    {
42
        return $this->attributes;
43
    }
44
45
    /**
46
     * @param array $attributes
47
     */
48
    public function setAttributes($attributes)
49
    {
50
        $this->attributes = $attributes;
51
    }
52
53
    /**
54
     * @return mixed
55
     */
56
    public function getStatus()
57
    {
58
        return $this->status;
59
    }
60
61
    /**
62
     * @return mixed
63
     */
64
    public function getValue()
65
    {
66
        return $this->value;
67
    }
68
69
    /**
70
     * @return mixed
71
     */
72
    public function getMessage()
73
    {
74
        return $this->message;
75
    }
76
77
    /**
78
     * @return Response
79
     */
80
    public function getResponse()
81
    {
82
        return $this->response;
83
    }
84
85
    /**
86
     * @param Response $response
87
     */
88
    public function setResponse(Response $response)
89
    {
90
        $this->response = $response;
91
    }
92
93
    /**
94
     * @return mixed
95
     */
96
    public function getRuleName()
97
    {
98
        return $this->ruleName;
99
    }
100
101
    /**
102
     * @param mixed $ruleName
103
     */
104
    public function setRuleName($ruleName)
105
    {
106
        $this->ruleName = $ruleName;
107
    }
108
}
109