1 | <?php |
||
10 | class Notification |
||
11 | { |
||
12 | /** |
||
13 | * @var null|NotificationId |
||
14 | */ |
||
15 | protected $notificationId; |
||
16 | |||
17 | /** |
||
18 | * @var Destination |
||
19 | */ |
||
20 | protected $destination; |
||
21 | |||
22 | /** |
||
23 | * @var Subject |
||
24 | */ |
||
25 | protected $subject; |
||
26 | |||
27 | /** |
||
28 | * @var Body |
||
29 | */ |
||
30 | protected $body; |
||
31 | |||
32 | /** |
||
33 | * @var null|DeduplicationKey |
||
34 | */ |
||
35 | protected $deduplicationKey; |
||
36 | |||
37 | /** |
||
38 | * @var array|null |
||
39 | */ |
||
40 | protected $metadata; |
||
41 | |||
42 | /** |
||
43 | * @var DateTimeImmutable |
||
44 | */ |
||
45 | protected $createdAt; |
||
46 | |||
47 | /** |
||
48 | * @var null|DateTimeImmutable |
||
49 | */ |
||
50 | protected $sentAt; |
||
51 | |||
52 | /** |
||
53 | * @var null|DateTimeImmutable |
||
54 | */ |
||
55 | protected $failedAt; |
||
56 | |||
57 | /** |
||
58 | * @var null|string |
||
59 | */ |
||
60 | protected $failedFor; |
||
61 | |||
62 | /** |
||
63 | * @var null|DateTimeImmutable |
||
64 | */ |
||
65 | protected $lockedAt; |
||
66 | |||
67 | /** |
||
68 | * @param Destination $destination |
||
69 | * @param Subject $subject |
||
70 | * @param Body $body |
||
71 | * @param DeduplicationKey|null $deduplicationKey |
||
72 | * @param string|null $templateName |
||
|
|||
73 | * @param array|null $templateVariables |
||
74 | * @param array|null $metadata |
||
75 | */ |
||
76 | 24 | public function __construct( |
|
94 | |||
95 | /** |
||
96 | * @return null|NotificationId |
||
97 | */ |
||
98 | 3 | public function notificationId(): ?NotificationId |
|
107 | |||
108 | /** |
||
109 | * @return Destination |
||
110 | */ |
||
111 | 11 | public function destination(): Destination |
|
115 | |||
116 | /** |
||
117 | * @return Subject |
||
118 | */ |
||
119 | 6 | public function subject(): Subject |
|
123 | |||
124 | /** |
||
125 | * @return Body |
||
126 | */ |
||
127 | 4 | public function body(): Body |
|
131 | |||
132 | /** |
||
133 | * @return null|DeduplicationKey |
||
134 | */ |
||
135 | 5 | public function deduplicationKey(): ?DeduplicationKey |
|
139 | |||
140 | /** |
||
141 | * @return array|null |
||
142 | */ |
||
143 | 10 | public function metadata(): ?array |
|
147 | |||
148 | /** |
||
149 | * @param array $metadata |
||
150 | */ |
||
151 | public function setMetadata(array $metadata): void |
||
155 | |||
156 | /** |
||
157 | * @param string $key |
||
158 | * @param mixed $value |
||
159 | */ |
||
160 | public function addMetadata(string $key, $value): void |
||
164 | |||
165 | /** |
||
166 | * @return DateTimeImmutable |
||
167 | */ |
||
168 | 3 | public function createdAt(): DateTimeImmutable |
|
172 | |||
173 | /** |
||
174 | * @return DateTimeImmutable|null |
||
175 | */ |
||
176 | 7 | public function sentAt(): ?DateTimeImmutable |
|
180 | |||
181 | /** |
||
182 | * @return bool |
||
183 | */ |
||
184 | 7 | public function isSent(): bool |
|
188 | |||
189 | /** |
||
190 | * @return void |
||
191 | */ |
||
192 | 5 | public function markSent(): void |
|
198 | |||
199 | /** |
||
200 | * @return DateTimeImmutable|null |
||
201 | */ |
||
202 | 3 | public function failedAt(): ?DateTimeImmutable |
|
206 | |||
207 | /** |
||
208 | * @return null|string |
||
209 | */ |
||
210 | 2 | public function failedFor(): ?string |
|
214 | |||
215 | /** |
||
216 | * @return bool |
||
217 | */ |
||
218 | 3 | public function isFailed(): bool |
|
222 | |||
223 | /** |
||
224 | * @param string $reason |
||
225 | */ |
||
226 | 3 | public function markFailed(string $reason): void |
|
232 | |||
233 | /** |
||
234 | * @return void |
||
235 | */ |
||
236 | 5 | public function unmarkFailed(): void |
|
241 | |||
242 | /** |
||
243 | * @return DateTimeImmutable|null |
||
244 | */ |
||
245 | 3 | public function lockedAt(): ?DateTimeImmutable |
|
249 | |||
250 | /** |
||
251 | * @return bool |
||
252 | */ |
||
253 | 3 | public function isLocked(): bool |
|
257 | |||
258 | /** |
||
259 | * @return void |
||
260 | */ |
||
261 | 2 | public function lock(): void |
|
265 | |||
266 | /** |
||
267 | * @return void |
||
268 | */ |
||
269 | 1 | public function unlock(): void |
|
273 | |||
274 | /** |
||
275 | * @return bool |
||
276 | */ |
||
277 | 1 | public function isFresh(): bool |
|
281 | |||
282 | /** |
||
283 | * @return void |
||
284 | */ |
||
285 | 7 | private function assertNotSent(): void |
|
297 | |||
298 | /** |
||
299 | * For InMemoryNotificationRepository only. |
||
300 | * |
||
301 | * @param NotificationId $notificationId |
||
302 | */ |
||
303 | 2 | public function setNotificationId(NotificationId $notificationId): void |
|
307 | } |
||
308 | |||
309 |
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.