fix gitlab tests
This commit is contained in:
@@ -11,7 +11,8 @@ class PaymentMissedCheckService
|
||||
public function __construct(
|
||||
private UserNotificationDispatchService $notifier,
|
||||
private EmailService $emailService
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function findUsersWithMissedPayments(): array
|
||||
{
|
||||
@@ -45,7 +46,7 @@ class PaymentMissedCheckService
|
||||
foreach ($users as $user) {
|
||||
$userId = (int) ($user['user_id'] ?? 0);
|
||||
$email = (string) ($user['email'] ?? '');
|
||||
$name = trim((string) ($user['firstname'] ?? '').' '.(string) ($user['lastname'] ?? ''));
|
||||
$name = trim((string) ($user['firstname'] ?? '') . ' ' . (string) ($user['lastname'] ?? ''));
|
||||
|
||||
$this->notifier->notifyUser(
|
||||
$userId,
|
||||
@@ -58,8 +59,8 @@ class PaymentMissedCheckService
|
||||
|
||||
if ($email !== '') {
|
||||
$subject = 'Payment Missed';
|
||||
$body = '<p>Dear '.e($name !== '' ? $name : 'Parent').',</p>'
|
||||
.'<p>You have a missed payment. Please pay to avoid penalty.</p>';
|
||||
$body = '<p>Dear ' . e($name !== '' ? $name : 'Parent') . ',</p>'
|
||||
. '<p>You have a missed payment. Please pay to avoid penalty.</p>';
|
||||
$ok = $this->emailService->send($email, $subject, $body, 'finance');
|
||||
$ok ? $sent++ : $failed++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user