1 | <?php |
||
7 | class ZendeskMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $subject; |
||
11 | |||
12 | /** @var array */ |
||
13 | protected $requester = []; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected $description = ''; |
||
17 | |||
18 | /** @var string */ |
||
19 | protected $type; |
||
20 | |||
21 | /** @var string */ |
||
22 | protected $status = 'new'; |
||
23 | |||
24 | /** @var array */ |
||
25 | protected $tags = []; |
||
26 | |||
27 | /** @var string */ |
||
28 | protected $content = ''; |
||
29 | |||
30 | /** @var string */ |
||
31 | protected $htmlContent = ''; |
||
32 | |||
33 | /** @var bool */ |
||
34 | protected $isPublic = false; |
||
35 | |||
36 | /** @var string */ |
||
37 | protected $priority = 'normal'; |
||
38 | |||
39 | /** @var array */ |
||
40 | protected $customFields = []; |
||
41 | |||
42 | /** @var int */ |
||
43 | protected $groupId = ''; |
||
44 | |||
45 | /** |
||
46 | * @param string $subject |
||
47 | * |
||
48 | * @return static |
||
49 | */ |
||
50 | 1 | public static function create($subject = '', $description = '') |
|
54 | |||
55 | /** |
||
56 | * @param string $subject |
||
57 | */ |
||
58 | 6 | public function __construct($subject = '', $description = '') |
|
64 | |||
65 | /** |
||
66 | * Set the ticket subject. |
||
67 | * |
||
68 | * @param $subject |
||
69 | * |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function subject($subject) |
||
78 | |||
79 | /** |
||
80 | * Set the ticket customer name. |
||
81 | * |
||
82 | * @param string $name |
||
83 | * @param string $email |
||
84 | * |
||
85 | * @return $this |
||
86 | */ |
||
87 | 2 | public function from($name, $email) |
|
96 | |||
97 | /** |
||
98 | * Set the content message. |
||
99 | * |
||
100 | * @param $content |
||
101 | * |
||
102 | * @return $this |
||
103 | */ |
||
104 | 2 | public function content($content) |
|
110 | |||
111 | /** |
||
112 | * Set the HTML content message. |
||
113 | * |
||
114 | * @param string $html |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | public function htmlContent($html) |
||
124 | |||
125 | /** |
||
126 | * Set the description. |
||
127 | * |
||
128 | * @param string $description |
||
129 | * |
||
130 | * @return $this |
||
131 | */ |
||
132 | 2 | public function description($description) |
|
138 | |||
139 | /** |
||
140 | * Set the ticket type. |
||
141 | * Allowed values are problem, incident, question, or task. |
||
142 | * |
||
143 | * @param string $type |
||
144 | * |
||
145 | * @return $this |
||
146 | */ |
||
147 | public function type($type) |
||
156 | |||
157 | /** |
||
158 | * Set the ticket priority. |
||
159 | * Allowed values are urgent, high, normal, or low. |
||
160 | * |
||
161 | * @param string $priority |
||
162 | * |
||
163 | * @return $this |
||
164 | */ |
||
165 | public function priority($priority) |
||
174 | |||
175 | /** |
||
176 | * Set the ticket status. |
||
177 | * Allowed values are new, open, pending, hold, solved or closed. |
||
178 | * |
||
179 | * @return $this |
||
180 | */ |
||
181 | public function status($status) |
||
187 | |||
188 | /** |
||
189 | * Set the message to be public. |
||
190 | * |
||
191 | * @return $this |
||
192 | */ |
||
193 | 1 | public function visible() |
|
199 | |||
200 | /** |
||
201 | * Add a tag to the ticket. |
||
202 | * |
||
203 | * @param string $tag |
||
204 | * |
||
205 | * @return $this |
||
206 | */ |
||
207 | public function tag(array $tag) |
||
213 | |||
214 | /** |
||
215 | * Set the value of custom field in the new ticket. |
||
216 | * |
||
217 | * @param int $id |
||
218 | * @param string $value |
||
219 | * |
||
220 | * @return $this |
||
221 | */ |
||
222 | public function customField($id, $value) |
||
231 | |||
232 | /** |
||
233 | * Set the value of group id. |
||
234 | * |
||
235 | * @param int $id |
||
236 | * @param string $value |
||
|
|||
237 | * |
||
238 | * @return $this |
||
239 | */ |
||
240 | public function group($id) |
||
246 | |||
247 | 6 | public function getComment() |
|
263 | |||
264 | /** |
||
265 | * @return array |
||
266 | */ |
||
267 | 6 | public function toArray() |
|
282 | } |
||
283 |
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.