1 | <?php |
||
12 | class Payload implements PayloadContract |
||
13 | { |
||
14 | /** @var string */ |
||
15 | private $status; |
||
16 | |||
17 | /** @var array */ |
||
18 | private $input = []; |
||
19 | |||
20 | /** @var array */ |
||
21 | private $output = []; |
||
22 | |||
23 | /** @var array */ |
||
24 | private $messages = []; |
||
25 | |||
26 | /** |
||
27 | * Create a copy of the payload with the status. |
||
28 | * |
||
29 | * @param string $status |
||
30 | * |
||
31 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
32 | */ |
||
33 | public function withStatus($status) |
||
40 | |||
41 | /** |
||
42 | * Get the status of the payload. |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getStatus() |
||
50 | |||
51 | /** |
||
52 | * Create a copy of the payload with input array. |
||
53 | * |
||
54 | * @param array $input |
||
55 | * |
||
56 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
57 | */ |
||
58 | public function withInput(array $input) |
||
65 | |||
66 | /** |
||
67 | * Get input array from the payload. |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | public function getInput() |
||
75 | |||
76 | /** |
||
77 | * Create a copy of the payload with output array. |
||
78 | * |
||
79 | * @param array $output |
||
80 | * |
||
81 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
82 | */ |
||
83 | public function withOutput(array $output) |
||
90 | |||
91 | /** |
||
92 | * Get output array from the payload. |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | public function getOutput() |
||
100 | |||
101 | /** |
||
102 | * Create a copy of the payload with messages array. |
||
103 | * |
||
104 | * @param array $output |
||
|
|||
105 | * |
||
106 | * @return \BrightComponents\Common\Payloads\Contracts\PayloadContract |
||
107 | */ |
||
108 | public function withMessages(array $messages) |
||
115 | |||
116 | /** |
||
117 | * Get messages array from the payload. |
||
118 | * |
||
119 | * @return array |
||
120 | */ |
||
121 | public function getMessages() |
||
125 | |||
126 | public function getArrayableItems($input) |
||
144 | } |
||
145 |
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.