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

Result   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 64
c 1
b 0
f 0
wmc 6
lcom 0
cbo 0
rs 10

6 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
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