diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 594f1aa3..33f87ec6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -68,9 +68,6 @@ emailLog]]> - - new $className($config) - diff --git a/src/Controller/MailPreviewController.php b/src/Controller/MailPreviewController.php index 4f00e595..5ef5b5d6 100644 --- a/src/Controller/MailPreviewController.php +++ b/src/Controller/MailPreviewController.php @@ -281,9 +281,9 @@ protected function findPreview(string $previewName, string $emailName, string $p $mailPreview = new $realClass(); $email = $mailPreview->find($emailName); - if (!$email) { + if ($email === null) { throw new NotFoundException(sprintf( - 'Mailer preview %s::%s not found', + 'Mailer preview `%s::%s` not found', $previewName, $emailName )); diff --git a/src/DebugInclude.php b/src/DebugInclude.php index 944c5308..1c369eba 100644 --- a/src/DebugInclude.php +++ b/src/DebugInclude.php @@ -82,6 +82,7 @@ public function __construct() */ public function includePaths(): array { + /** @psalm-suppress RedundantCast */ $paths = explode(PATH_SEPARATOR, (string)get_include_path()); $paths = array_filter($paths, function ($path) { if ($path === '.' || strlen($path) === 0) { diff --git a/src/Mailer/Transport/DebugKitTransport.php b/src/Mailer/Transport/DebugKitTransport.php index 6a00151c..5b1d14b4 100644 --- a/src/Mailer/Transport/DebugKitTransport.php +++ b/src/Mailer/Transport/DebugKitTransport.php @@ -57,6 +57,7 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran if ($className) { unset($config['originalClassName'], $config['debugKitLog']); + /** @psalm-suppress UnsafeInstantiation */ $this->originalTransport = new $className($config); } }