From 85b9f76969dc2c3ec5db89990e1044d3b539011c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E4=BA=8E=E5=BA=AD?= Date: Fri, 4 Aug 2023 02:03:28 +0800 Subject: [PATCH] Dev: Remove the email ignore errors. --- phpstan-baseline.php | 40 ---------------------------------------- system/Email/Email.php | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 2862ecaed635..1331d8244106 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -836,46 +836,6 @@ 'count' => 2, 'path' => __DIR__ . '/system/Debug/Toolbar/Collectors/Views.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:SMTPEnd\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:appendAttachments\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:batchBCCSend\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:buildHeaders\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:buildMessage\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:setErrorMessage\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:unwrapSpecials\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method CodeIgniter\\\\Email\\\\Email\\:\\:writeHeaders\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Email/Email.php', -]; $ignoreErrors[] = [ 'message' => '#^Static property CodeIgniter\\\\Email\\\\Email\\:\\:\\$func_overload \\(bool\\) in isset\\(\\) is not nullable\\.$#', 'count' => 1, diff --git a/system/Email/Email.php b/system/Email/Email.php index fe68ff2deda9..d962042d5e7a 100644 --- a/system/Email/Email.php +++ b/system/Email/Email.php @@ -1064,6 +1064,8 @@ public function wordWrap($str, $charlim = null) /** * Build final headers + * + * @return void */ protected function buildHeaders() { @@ -1077,6 +1079,8 @@ protected function buildHeaders() /** * Write Headers as a string + * + * @return void */ protected function writeHeaders() { @@ -1103,6 +1107,8 @@ protected function writeHeaders() /** * Build Final Body and attachments + * + * @return void */ protected function buildMessage() { @@ -1263,6 +1269,8 @@ protected function attachmentsHaveMultipart($type) * @param string $body Message body to append to * @param string $boundary Multipart boundary * @param string|null $multipart When provided, only attachments of this type will be processed + * + * @return void */ protected function appendAttachments(&$body, $boundary, $multipart = null) { @@ -1579,6 +1587,8 @@ public function send($autoClear = true) /** * Batch Bcc Send. Sends groups of BCCs in batches + * + * @return void */ public function batchBCCSend() { @@ -1623,6 +1633,8 @@ public function batchBCCSend() /** * Unwrap special elements + * + * @return void */ protected function unwrapSpecials() { @@ -1837,6 +1849,8 @@ protected function sendWithSmtp() /** * Shortcut to send RSET or QUIT depending on keep-alive + * + * @return void */ protected function SMTPEnd() { @@ -2156,6 +2170,8 @@ private function printDebuggerRaw(): string /** * @param string $msg + * + * @return void */ protected function setErrorMessage($msg) {