| Conditions | 3 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function getMonitorProperties($extraProperties = []): array |
||
| 21 | { |
||
| 22 | $monitor = $this->event->monitor; |
||
| 23 | |||
| 24 | $properties['location'] = config('laravel-uptime-monitor.notifications.location'); |
||
| 25 | |||
| 26 | $properties['url'] = (string) $monitor->url; |
||
| 27 | |||
| 28 | if (! empty($monitor->look_for_string)) { |
||
| 29 | $properties['look for string'] = $monitor->look_for_string; |
||
| 30 | } |
||
| 31 | |||
| 32 | $properties = array_merge($properties, $extraProperties); |
||
| 33 | |||
| 34 | if ($monitor->check_ssl_certificate) { |
||
| 35 | $properties['ssl certificate valid'] = $monitor->ssl_certificate_status; |
||
| 36 | $properties['ssl certificate issuer'] = $monitor->ssl_certificate_issuer; |
||
| 37 | $properties['ssl certificate expiration date'] = $monitor->formattedSslCertificateExpirationDate; |
||
| 38 | } |
||
| 39 | |||
| 40 | return array_filter($properties); |
||
| 41 | } |
||
| 42 | |||
| 48 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.