From 445cc23abdda5767b622d70cf7b5eb5310dcf908 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 22 May 2023 20:55:59 +0200 Subject: PHPStan Level 7 complete (#5406) * PHPStan Level 7 complete * Start PHPStan Level 8 * Forgot exclude .phtml --- lib/Minz/Mailer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Minz/Mailer.php') diff --git a/lib/Minz/Mailer.php b/lib/Minz/Mailer.php index cf6c64bad..7cf99a667 100644 --- a/lib/Minz/Mailer.php +++ b/lib/Minz/Mailer.php @@ -34,7 +34,7 @@ class Minz_Mailer { /** @var string */ private $mailer; - /** @var array */ + /** @var array{'hostname':string,'host':string,'auth':bool,'username':string,'password':string,'secure':string,'port':int,'from':string} */ private $smtp_config; /** @var int */ private $debug_level; @@ -71,7 +71,7 @@ class Minz_Mailer { public function mail(string $to, string $subject): bool { ob_start(); $this->view->render(); - $body = ob_get_contents(); + $body = ob_get_contents() ?: ''; ob_end_clean(); PHPMailer::$validator = 'html5'; -- cgit v1.2.3