Completed
Push — master ( 354a9a...b211f5 )
by Nils
02:01
created

CheckResult::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace whm\Smoke\Rules;
4
5
use phm\HttpWebdriverClient\Http\Response\UriAwareResponse;
6
use Psr\Http\Message\ResponseInterface;
7
8
class CheckResult
9
{
10
    const STATUS_SUCCESS = 'success';
11
    const STATUS_FAILURE = 'failure';
12
    const STATUS_NONE = 'none';
13
14
    private $status;
15
    private $value;
16
    private $message;
17
    private $attributes = array();
18
    private $ruleName;
19
    private $url;
20
21
    /**
22
     * @var ResponseInterface
23
     */
24
    private $response;
25
26
    /**
27
     * Result constructor.
28
     *
29
     * @param $status
30
     * @param $value
31
     * @param $message
32
     */
33
    public function __construct($status, $message = '', $value = null, $url = null)
34
    {
35
        $this->status = $status;
36
        $this->value = $value;
37
        $this->message = $message;
38
        $this->url = $url;
39
    }
40
41
    /**
42
     * @return Attribute[]
43
     */
44
    public function getAttributes()
45
    {
46
        return $this->attributes;
47
    }
48
49
    /**
50
     * @param array $attributes
0 ignored issues
show
Documentation introduced by
There is no parameter named $attributes. Did you maybe mean $attribute?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
51
     */
52
    public function addAttribute(Attribute $attribute)
53
    {
54
        $this->attributes[] = $attribute;
55
    }
56
57
    /**
58
     * @return mixed
59
     */
60
    public function getStatus()
61
    {
62
        return $this->status;
63
    }
64
65
    /**
66
     * @return mixed
67
     */
68
    public function getValue()
69
    {
70
        return $this->value;
71
    }
72
73
    /**
74
     * @return mixed
75
     */
76
    public function getMessage()
77
    {
78
        return $this->message;
79
    }
80
81
    /**
82
     * @return UriAwareResponse
83
     */
84
    public function getResponse()
85
    {
86
        return $this->response;
87
    }
88
89
    /**
90
     * @param ResponseInterface $response
91
     */
92
    public function setResponse(ResponseInterface $response)
93
    {
94
        $this->response = $response;
95
    }
96
97
    /**
98
     * @return mixed
99
     */
100
    public function getRuleName()
101
    {
102
        return $this->ruleName;
103
    }
104
105
    /**
106
     * @param mixed $ruleName
107
     */
108
    public function setRuleName($ruleName)
109
    {
110
        $this->ruleName = $ruleName;
111
    }
112
113
    /**
114
     * @return string
115
     */
116
    public function getUrl()
117
    {
118
        return $this->url;
119
    }
120
}
121