Skip to content

Commit

Permalink
2911: Added application name to mail subject
Browse files Browse the repository at this point in the history
  • Loading branch information
cableman committed Nov 18, 2024
1 parent 0e858e8 commit 71e740b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Service/AlertManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ public function checkDevice(\DateTimeImmutable $now, int $deviceId, ?Application
// Device limit for last seen is reached.
if (!$noMail) {
$subject = sprintf(
'Enheden "%s" offline siden %s',
'Enheden "%s" offline siden %s (%s)',
$device->name,
$device->latestReceivedMessage->sentTime->format('d-m-Y H:i:s')
$device->latestReceivedMessage->sentTime->format('d-m-Y H:i:s'),
$application->name

Check failure on line 241 in src/Service/AlertManager.php

View workflow job for this annotation

GitHub Actions / Psalm static analysis (8.3)

PossiblyNullPropertyFetch

src/Service/AlertManager.php:241:21: PossiblyNullPropertyFetch: Cannot get property on possibly null variable $application of type App\Model\Application|null (see https://psalm.dev/082)

Check failure on line 241 in src/Service/AlertManager.php

View workflow job for this annotation

GitHub Actions / Psalm static analysis (8.3)

PossiblyNullArgument

src/Service/AlertManager.php:241:21: PossiblyNullArgument: Argument 4 of sprintf cannot be null, possibly null value provided (see https://psalm.dev/078)
);
$this->mailService->sendEmail(
to: $this->findDeviceToMailAddress($device, $application, $overrideMail),
Expand Down

0 comments on commit 71e740b

Please sign in to comment.