Fix PHPStan errors introduced by mail and certificate publisher refactor

- Make Mail and Certificate message classes final with proper typed PHPDoc
- Use @var assertions and is_string() guards at call sites instead of mixed casts
- Add ?? fallback on Queue constructor calls to resolve string|null
- Add MailsPublisher type hint to untyped closure parameter
- Regenerate phpstan baseline to remove stale old Mail setter suppressions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
loks0n
2026-03-15 20:55:56 +00:00
co-authored by Claude Sonnet 4.6
parent 52628e44e5
commit da7e5833e9
13 changed files with 148 additions and 351 deletions
+1
View File
@@ -1863,6 +1863,7 @@ Http::post('/v1/projects/:projectId/smtp/tests')
->setParam('{{privacyUrl}}', $plan['privacyUrl'] ?? APP_EMAIL_PRIVACY_URL);
foreach ($emails as $email) {
/** @var string $email */
$publisherForMails->enqueue(new Mail(
project: $project,
recipient: $email,