1 | <?php |
||
11 | class Notification |
||
12 | { |
||
13 | /** |
||
14 | * @var null|NotificationId |
||
15 | */ |
||
16 | protected $notificationId; |
||
17 | |||
18 | /** |
||
19 | * @var Destination |
||
20 | */ |
||
21 | protected $destination; |
||
22 | |||
23 | /** |
||
24 | * @var Subject |
||
25 | */ |
||
26 | protected $subject; |
||
27 | |||
28 | /** |
||
29 | * @var Body |
||
30 | */ |
||
31 | protected $body; |
||
32 | |||
33 | /** |
||
34 | * @var null|DeduplicationKey |
||
35 | */ |
||
36 | protected $deduplicationKey; |
||
37 | |||
38 | /** |
||
39 | * @var array|null |
||
40 | */ |
||
41 | protected $metadata; |
||
42 | |||
43 | /** |
||
44 | * @var DateTimeImmutable |
||
45 | */ |
||
46 | protected $createdAt; |
||
47 | |||
48 | /** |
||
49 | * @var null|DateTimeImmutable |
||
50 | */ |
||
51 | protected $sentAt; |
||
52 | |||
53 | /** |
||
54 | * @var null|DateTimeImmutable |
||
55 | */ |
||
56 | protected $failedAt; |
||
57 | |||
58 | /** |
||
59 | * @var null|string |
||
60 | */ |
||
61 | protected $failedFor; |
||
62 | |||
63 | /** |
||
64 | * @var null|DateTimeImmutable |
||
65 | */ |
||
66 | protected $lockedAt; |
||
67 | |||
68 | /** |
||
69 | * @param Destination $destination |
||
70 | * @param Subject $subject |
||
71 | * @param Body $body |
||
72 | * @param DeduplicationKey|null $deduplicationKey |
||
73 | * @param string|null $templateName |
||
|
|||
74 | * @param array|null $templateVariables |
||
75 | * @param array|null $metadata |
||
76 | */ |
||
77 | 16 | public function __construct( |
|
95 | |||
96 | /** |
||
97 | * @return null|NotificationId |
||
98 | */ |
||
99 | 3 | public function notificationId(): ?NotificationId |
|
103 | |||
104 | /** |
||
105 | * @return Destination |
||
106 | */ |
||
107 | 11 | public function destination(): Destination |
|
111 | |||
112 | /** |
||
113 | * @return Subject |
||
114 | */ |
||
115 | 6 | public function subject(): Subject |
|
119 | |||
120 | /** |
||
121 | * @return Body |
||
122 | */ |
||
123 | 4 | public function body(): Body |
|
127 | |||
128 | /** |
||
129 | * @return null|DeduplicationKey |
||
130 | */ |
||
131 | 5 | public function deduplicationKey(): ?DeduplicationKey |
|
135 | |||
136 | /** |
||
137 | * @return array|null |
||
138 | */ |
||
139 | public function metadata(): ?array |
||
143 | |||
144 | /** |
||
145 | * @param array $metadata |
||
146 | */ |
||
147 | public function setMetadata(array $metadata): void |
||
151 | |||
152 | /** |
||
153 | * @param string $key |
||
154 | * @param mixed $value |
||
155 | */ |
||
156 | public function addMetadata(string $key, $value): void |
||
160 | |||
161 | /** |
||
162 | * @param array $metadataSpecs |
||
163 | * @return bool |
||
164 | */ |
||
165 | 2 | public function matchesMetadataSpecs(array $metadataSpecs): bool |
|
176 | |||
177 | |||
178 | /** |
||
179 | * @return DateTimeImmutable |
||
180 | */ |
||
181 | 3 | public function createdAt(): DateTimeImmutable |
|
185 | |||
186 | /** |
||
187 | * @return DateTimeImmutable|null |
||
188 | */ |
||
189 | 7 | public function sentAt(): ?DateTimeImmutable |
|
193 | |||
194 | /** |
||
195 | * @return bool |
||
196 | */ |
||
197 | 7 | public function isSent(): bool |
|
201 | |||
202 | /** |
||
203 | * @return void |
||
204 | */ |
||
205 | 5 | public function markSent(): void |
|
211 | |||
212 | /** |
||
213 | * @return DateTimeImmutable|null |
||
214 | */ |
||
215 | 3 | public function failedAt(): ?DateTimeImmutable |
|
219 | |||
220 | /** |
||
221 | * @return null|string |
||
222 | */ |
||
223 | 2 | public function failedFor(): ?string |
|
227 | |||
228 | /** |
||
229 | * @return bool |
||
230 | */ |
||
231 | 3 | public function isFailed(): bool |
|
235 | |||
236 | /** |
||
237 | * @param string $reason |
||
238 | */ |
||
239 | 3 | public function markFailed(string $reason): void |
|
245 | |||
246 | /** |
||
247 | * @return void |
||
248 | */ |
||
249 | 5 | public function unmarkFailed(): void |
|
254 | |||
255 | /** |
||
256 | * @return DateTimeImmutable|null |
||
257 | */ |
||
258 | 3 | public function lockedAt(): ?DateTimeImmutable |
|
262 | |||
263 | /** |
||
264 | * @return bool |
||
265 | */ |
||
266 | 3 | public function isLocked(): bool |
|
270 | |||
271 | /** |
||
272 | * @return void |
||
273 | */ |
||
274 | 2 | public function lock(): void |
|
278 | |||
279 | /** |
||
280 | * @return void |
||
281 | */ |
||
282 | 1 | public function unlock(): void |
|
286 | |||
287 | /** |
||
288 | * @return bool |
||
289 | */ |
||
290 | 1 | public function isFresh(): bool |
|
294 | |||
295 | /** |
||
296 | * @return void |
||
297 | */ |
||
298 | 7 | private function assertNotSent(): void |
|
310 | |||
311 | /** |
||
312 | * For InMemoryNotificationRepository only. |
||
313 | * |
||
314 | * @param NotificationId $notificationId |
||
315 | */ |
||
316 | 2 | public function setNotificationId(NotificationId $notificationId): void |
|
320 | } |
||
321 | |||
322 |
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.