1 | <?php |
||
9 | abstract class BaseNotification extends Notification |
||
10 | { |
||
11 | /** |
||
12 | * Get the notification's delivery channels. |
||
13 | * |
||
14 | * @param mixed $notifiable |
||
15 | * @return array |
||
16 | */ |
||
17 | public function via($notifiable) |
||
|
|||
18 | { |
||
19 | return config('laravel-uptime-monitor.notifications.notifications.'.static::class); |
||
20 | } |
||
21 | |||
22 | public function getMonitor(): Monitor |
||
23 | { |
||
24 | return $this->event->monitor; |
||
25 | } |
||
26 | |||
27 | public function getMonitorProperties($extraProperties = []): array |
||
28 | { |
||
29 | $monitor = $this->getMonitor(); |
||
30 | |||
31 | $properties = array_merge([], $extraProperties); |
||
32 | |||
33 | if ($monitor->certificate_check_enabled && $monitor->certificate_status === CertificateStatus::VALID) { |
||
34 | $certificateTitle = "Certificate expires in {$monitor->formattedCertificateExpirationDate('forHumans')}"; |
||
35 | $certificateIssuer = $monitor->certificate_issuer; |
||
36 | |||
37 | $properties[$certificateTitle] = $certificateIssuer; |
||
38 | } |
||
39 | |||
40 | return array_filter($properties); |
||
41 | } |
||
42 | |||
43 | public function getLocationDescription(): string |
||
53 | |||
54 | public function isStillRelevant(): bool |
||
58 | } |
||
59 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.