1 | <?php |
||
7 | class Payload extends PayloadContract |
||
8 | { |
||
9 | /** @var string */ |
||
10 | private $status; |
||
11 | |||
12 | /** @var array */ |
||
13 | private $input = []; |
||
14 | |||
15 | /** @var array */ |
||
16 | private $output = []; |
||
17 | |||
18 | /** @var array */ |
||
19 | private $messages = []; |
||
20 | |||
21 | /** |
||
22 | * Create a copy of the payload with the status. |
||
23 | * |
||
24 | * @param string $status |
||
25 | * |
||
26 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
27 | */ |
||
28 | public function withStatus($status) |
||
35 | |||
36 | /** |
||
37 | * Get the status of the payload. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getStatus() |
||
45 | |||
46 | /** |
||
47 | * Create a copy of the payload with input array. |
||
48 | * |
||
49 | * @param array $input |
||
50 | * |
||
51 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
52 | */ |
||
53 | public function withInput(array $input) |
||
60 | |||
61 | /** |
||
62 | * Get input array from the payload. |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | public function getInput() |
||
70 | |||
71 | /** |
||
72 | * Create a copy of the payload with output array. |
||
73 | * |
||
74 | * @param array $output |
||
75 | * |
||
76 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
77 | */ |
||
78 | public function withOutput(array $output) |
||
85 | |||
86 | /** |
||
87 | * Get output array from the payload. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getOutput() |
||
95 | |||
96 | /** |
||
97 | * Create a copy of the payload with messages array. |
||
98 | * |
||
99 | * @param array $output |
||
|
|||
100 | * |
||
101 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
102 | */ |
||
103 | public function withMessages(array $messages) |
||
110 | |||
111 | /** |
||
112 | * Get messages array from the payload. |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | public function getMessages() |
||
120 | } |
||
121 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.