PHPStan level 3 #1603

Merged
nupplaPhil merged 15 commits from Art4/friendica-addons:phpstan-level-3 into develop 2025-04-27 02:17:42 +02:00
Showing only changes of commit 21a7529a0e - Show all commits

fix PHPStan error in phpmailer addon

Art4 2025-02-26 15:21:19 +00:00

View file

@ -28,10 +28,14 @@ function phpmailer_load_config(ConfigFileManager $loader)
}
/**
* @param IEmail $email
* @param null|IEmail $email
*/
function phpmailer_emailer_send_prepare(IEmail &$email)
function phpmailer_emailer_send_prepare(?IEmail &$email)
{
if ($email === null) {
return;
}
// Passing `true` enables exceptions
$mailer = new PHPMailer(true);
try {