From 67e0060943b2e69f998448ccb142fe450a5cc28d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 20 Oct 2022 09:55:48 +1300 Subject: [PATCH] API Update method signatures --- src/Utility/TestMailer.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Utility/TestMailer.php b/src/Utility/TestMailer.php index 5f61b15..3960a9c 100644 --- a/src/Utility/TestMailer.php +++ b/src/Utility/TestMailer.php @@ -25,7 +25,7 @@ class TestMailer extends BaseTestMailer /** * Clear the log of emails sent */ - public function clearEmails() + public function clearEmails(): void { $state = $this->testSessionEnvironment->getState(); if (isset($state->emails)) { @@ -34,8 +34,12 @@ class TestMailer extends BaseTestMailer $this->testSessionEnvironment->applyState($state); } - public function findEmail($to = null, $from = null, $subject = null, $content = null) - { + public function findEmail( + string $to, + ?string $from = null, + ?string $subject = null, + ?string $content = null + ): ?array { $matches = $this->findEmails($to, $from, $subject, $content); //got the count of matches emails $emailCount = count($matches ?? []);