diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 924761ff..09102d2f 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -7,30 +7,35 @@ return (new PhpCsFixer\Config()) ->setRiskyAllowed(true) ->setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHP71Migration' => true, // @PHP72Migration does not exist - '@PHP71Migration:risky' => true, // @PHP72Migration:risky does not exist + '@PSR12' => true, 'array_syntax' => ['syntax' => 'short'], - 'declare_strict_types' => true, - 'global_namespace_import' => [ - 'import_classes' => true, - 'import_constants' => true, - 'import_functions' => false, - ], - 'native_constant_invocation' => true, - 'native_function_invocation' => [ - 'strict' => false, - 'include' => ['@compiler_optimized'], - ], + 'single_quote' => true, + 'include' => true, 'no_superfluous_phpdoc_tags' => true, - 'ordered_class_elements' => true, + 'no_extra_blank_lines' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, 'ordered_imports' => true, - 'php_unit_dedicate_assert' => ['target' => 'newest'], - 'php_unit_method_casing' => true, - 'php_unit_test_case_static_method_calls' => ['call_type' => 'this'], - 'phpdoc_to_comment' => false, - 'void_return' => true, + 'phpdoc_align' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_inline_tag_normalizer' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_alias_tag' => true, + 'phpdoc_no_package' => true, + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_return_self_reference' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_summary' => true, + 'phpdoc_tag_type' => true, + 'phpdoc_to_comment' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_types' => true, + 'phpdoc_types_order' => true, + 'phpdoc_var_without_name' => true ]) ->setFinder(PhpCsFixer\Finder::create() ->exclude('vendor') diff --git a/src/PhpImap/DataPartInfo.php b/src/PhpImap/DataPartInfo.php index 68841016..3442b358 100644 --- a/src/PhpImap/DataPartInfo.php +++ b/src/PhpImap/DataPartInfo.php @@ -34,7 +34,7 @@ class DataPartInfo */ public $encoding; - /** @var string|null */ + /** @var null|string */ public $charset; /** @@ -58,7 +58,7 @@ class DataPartInfo */ public $options; - /** @var string|null */ + /** @var null|string */ protected $data; /** diff --git a/src/PhpImap/Imap.php b/src/PhpImap/Imap.php index 7bc0ebbc..632e5b79 100644 --- a/src/PhpImap/Imap.php +++ b/src/PhpImap/Imap.php @@ -69,7 +69,7 @@ final class Imap ]; /** - * @param resource|false $imap_stream + * @param false|resource $imap_stream * * @return true * @@ -143,7 +143,7 @@ public static function check($imap_stream): object throw new UnexpectedValueException('Could not check imap mailbox!', 0, self::HandleErrors(\imap_errors(), 'imap_check')); } - /** @var object */ + /* @var object */ return $result; } @@ -233,7 +233,7 @@ public static function createmailbox($imap_stream, string $mailbox): bool /** * @param false|resource $imap_stream - * @param string|int $msg_number + * @param int|string $msg_number * * @return true */ @@ -339,13 +339,13 @@ public static function fetch_overview( throw new UnexpectedValueException('Could not fetch overview for message from mailbox!', 0, self::HandleErrors(\imap_errors(), 'imap_fetch_overview')); } - /** @psalm-var list */ + /* @psalm-var list */ return $result; } /** * @param false|resource $imap_stream - * @param string|int $section + * @param int|string $section */ public static function fetchbody( $imap_stream, @@ -418,7 +418,7 @@ public static function fetchstructure( throw new UnexpectedValueException('Could not fetch message structure from mailbox!', 0, self::HandleErrors(\imap_errors(), 'imap_fetchstructure')); } - /** @psalm-var PARTSTRUCTURE */ + /* @psalm-var PARTSTRUCTURE */ return $result; } @@ -446,7 +446,7 @@ public static function get_quotaroot( } /** - * @param resource|false $imap_stream + * @param false|resource $imap_stream * * @return object[] * @@ -479,12 +479,12 @@ public static function getmailboxes( throw new UnexpectedValueException('Call to imap_getmailboxes() with supplied arguments returned false, not array!', 0, self::HandleErrors(\imap_errors(), 'imap_getmailboxes')); } - /** @psalm-var list */ + /* @psalm-var list */ return $result; } /** - * @param resource|false $imap_stream + * @param false|resource $imap_stream * * @return object[] * @@ -507,7 +507,7 @@ public static function getsubscribed( throw new UnexpectedValueException('Call to imap_getsubscribed() with supplied arguments returned false, not array!', 0, self::HandleErrors(\imap_errors(), 'imap_getsubscribed')); } - /** @psalm-var list */ + /* @psalm-var list */ return $result; } @@ -716,7 +716,7 @@ public static function open( } /** - * @param resource|false $imap_stream + * @param false|resource $imap_stream * * @psalm-pure */ @@ -779,7 +779,7 @@ public static function reopen( /** * @param false|resource $imap_stream - * @param string|false|resource $file + * @param false|resource|string $file * * @return true */ @@ -852,7 +852,7 @@ public static function search( throw new UnexpectedValueException('Could not search mailbox!', 0, self::HandleErrors($errors, 'imap_search')); } - /** @psalm-var list */ + /* @psalm-var list */ return $result; } @@ -954,7 +954,7 @@ public static function sort( throw new UnexpectedValueException('Could not sort messages!', 0, self::HandleErrors(\imap_errors(), 'imap_sort')); } - /** @psalm-var list */ + /* @psalm-var list */ return $result; } @@ -1001,7 +1001,7 @@ public static function subscribe($imap_stream, string $mailbox): void /** * @psalm-param value-of $timeout_type * - * @return true|int + * @return int|true */ public static function timeout( int $timeout_type, @@ -1095,7 +1095,7 @@ private static function EnsureResource($maybe, string $method, int $argument) throw new InvalidArgumentException('Argument '.(string) $argument.' passed to '.$method.' must be a valid resource!'); } - /** @var resource */ + /* @var resource */ return $maybe; } diff --git a/src/PhpImap/IncomingMail.php b/src/PhpImap/IncomingMail.php index d9552615..35b059d0 100644 --- a/src/PhpImap/IncomingMail.php +++ b/src/PhpImap/IncomingMail.php @@ -34,10 +34,10 @@ class IncomingMail extends IncomingMailHeader */ protected $dataInfo = [[], []]; - /** @var string|null */ + /** @var null|string */ private $textPlain; - /** @var string|null */ + /** @var null|string */ private $textHtml; /** @@ -70,7 +70,7 @@ public function __get(string $name): string $this->$name .= \trim($data->fetch()); } - /** @var string */ + /* @var string */ return $this->$name; } @@ -99,7 +99,7 @@ public function setHeader(IncomingMailHeader $header): void } /** - * @param DataPartInfo::TEXT_PLAIN|DataPartInfo::TEXT_HTML $type + * @param DataPartInfo::TEXT_HTML|DataPartInfo::TEXT_PLAIN $type */ public function addDataPartInfo(DataPartInfo $dataInfo, int $type): void { @@ -197,7 +197,7 @@ public function replaceInternalLinks(string $baseUri): string } } - /** @psalm-var string */ + /* @psalm-var string */ return \str_replace($search, $replace, $fetchedHtml); } @@ -219,7 +219,7 @@ public function embedImageAttachments(): void $cid = \str_replace('cid:', '', $match); foreach ($attachments as $attachment) { - /** + /* * Inline images can contain a "Content-Disposition: inline", but only a "Content-ID" is also enough. * See https://github.com/barbushin/php-imap/issues/569. */ diff --git a/src/PhpImap/IncomingMailAttachment.php b/src/PhpImap/IncomingMailAttachment.php index 2e29ce83..ed28f5f4 100644 --- a/src/PhpImap/IncomingMailAttachment.php +++ b/src/PhpImap/IncomingMailAttachment.php @@ -13,70 +13,70 @@ * * @author Barbushin Sergey http://linkedin.com/in/barbushin * - * @property string|false|null $filePath lazy attachment data file + * @property null|false|string $filePath lazy attachment data file * * @psalm-type fileinfoconst = 0|2|16|1024|1040|8|32|128|256|16777216 */ class IncomingMailAttachment { - /** @var string|null */ + /** @var null|string */ public $id; - /** @var string|null */ + /** @var null|string */ public $contentId; - /** @var int|null */ + /** @var null|int */ public $type; - /** @var int|null */ + /** @var null|int */ public $encoding; - /** @var string|null */ + /** @var null|string */ public $subtype; - /** @var string|null */ + /** @var null|string */ public $description; - /** @var string|null */ + /** @var null|string */ public $name; - /** @var int|null */ + /** @var null|int */ public $sizeInBytes; - /** @var string|null */ + /** @var null|string */ public $disposition; - /** @var string|null */ + /** @var null|string */ public $charset; - /** @var bool|null */ + /** @var null|bool */ public $emlOrigin; - /** @var string|null */ + /** @var null|string */ public $fileInfoRaw; - /** @var string|null */ + /** @var null|string */ public $fileInfo; - /** @var string|null */ + /** @var null|string */ public $mime; - /** @var string|null */ + /** @var null|string */ public $mimeEncoding; - /** @var string|null */ + /** @var null|string */ public $fileExtension; - /** @var string|null */ + /** @var null|string */ public $mimeType; - /** @var string|null */ + /** @var null|string */ private $file_path; - /** @var DataPartInfo|null */ + /** @var null|DataPartInfo */ private $dataInfo; - /** @var string|null */ + /** @var null|string */ private $filePath; /** diff --git a/src/PhpImap/IncomingMailHeader.php b/src/PhpImap/IncomingMailHeader.php index 908c4f3c..ce949257 100644 --- a/src/PhpImap/IncomingMailHeader.php +++ b/src/PhpImap/IncomingMailHeader.php @@ -11,13 +11,13 @@ */ class IncomingMailHeader { - /** @var int|null The IMAP message ID - not the "Message-ID:"-header of the email */ + /** @var null|int The IMAP message ID - not the "Message-ID:"-header of the email */ public $id; - /** @var string|null */ + /** @var null|string */ public $imapPath; - /** @var string|null */ + /** @var null|string */ public $mailboxFolder; /** @var bool */ @@ -38,76 +38,76 @@ class IncomingMailHeader /** @var bool */ public $isDraft = false; - /** @var string|null */ + /** @var null|string */ public $date; - /** @var string|null */ + /** @var null|string */ public $headersRaw; - /** @var object|null */ + /** @var null|object */ public $headers; - /** @var string|null */ + /** @var null|string */ public $mimeVersion; - /** @var string|null */ + /** @var null|string */ public $xVirusScanned; - /** @var string|null */ + /** @var null|string */ public $organization; - /** @var string|null */ + /** @var null|string */ public $contentType; - /** @var string|null */ + /** @var null|string */ public $xMailer; - /** @var string|null */ + /** @var null|string */ public $contentLanguage; - /** @var string|null */ + /** @var null|string */ public $xSenderIp; - /** @var string|null */ + /** @var null|string */ public $priority; - /** @var string|null */ + /** @var null|string */ public $importance; - /** @var string|null */ + /** @var null|string */ public $sensitivity; - /** @var string|null */ + /** @var null|string */ public $autoSubmitted; - /** @var string|null */ + /** @var null|string */ public $precedence; - /** @var string|null */ + /** @var null|string */ public $failedRecipients; - /** @var string|null */ + /** @var null|string */ public $subject; - /** @var string|null */ + /** @var null|string */ public $fromHost; - /** @var string|null */ + /** @var null|string */ public $fromName; - /** @var string|null */ + /** @var null|string */ public $fromAddress; - /** @var string|null */ + /** @var null|string */ public $senderHost; - /** @var string|null */ + /** @var null|string */ public $senderName; - /** @var string|null */ + /** @var null|string */ public $senderAddress; - /** @var string|null */ + /** @var null|string */ public $xOriginalTo; /** @@ -117,7 +117,7 @@ class IncomingMailHeader */ public $to = []; - /** @var string|null */ + /** @var null|string */ public $toString; /** @@ -127,7 +127,7 @@ class IncomingMailHeader */ public $cc = []; - /** @var string|null */ + /** @var null|string */ public $ccString; /** @@ -144,6 +144,6 @@ class IncomingMailHeader */ public $replyTo = []; - /** @var string|null */ + /** @var null|string */ public $messageId; } diff --git a/src/PhpImap/Mailbox.php b/src/PhpImap/Mailbox.php index 8e1803b9..12dd7f9f 100644 --- a/src/PhpImap/Mailbox.php +++ b/src/PhpImap/Mailbox.php @@ -134,7 +134,7 @@ class Mailbox /** @var string */ protected $serverEncoding = 'UTF-8'; - /** @var string|null */ + /** @var null|string */ protected $attachmentsDir = null; /** @var bool */ @@ -159,7 +159,7 @@ class Mailbox /** @var bool|false */ protected $attachmentFilenameMode = false; - /** @var resource|null */ + /** @var null|resource */ private $imapStream; /** @@ -357,7 +357,7 @@ public function setTimeouts(int $timeout, array $types = [IMAP_OPENTIMEOUT, IMAP throw new InvalidParameterException('You have provided at least one unsupported timeout type. Supported types are: IMAP_OPENTIMEOUT, IMAP_READTIMEOUT, IMAP_WRITETIMEOUT, IMAP_CLOSETIMEOUT'); } - /** @var array{1?:int, 2?:int, 3?:int, 4?:int} */ + /* @var array{1?:int, 2?:int, 3?:int, 4?:int} */ $this->timeouts = \array_fill_keys($types, $timeout); } @@ -374,7 +374,7 @@ public function getLogin(): string /** * Set custom connection arguments of imap_open method. See http://php.net/imap_open. * - * @param string[]|null $params + * @param null|string[] $params * * @psalm-param array{DISABLE_AUTHENTICATOR?:string}|array|null $params * @@ -431,7 +431,7 @@ public function setAttachmentsDir(string $attachmentsDir): void /** * Get current saving folder for attachments. * - * @return string|null Attachments dir + * @return null|string Attachments dir */ public function getAttachmentsDir(): ?string { @@ -470,7 +470,7 @@ public function getImapStream(bool $forceConnection = true) } } - /** @var resource */ + /* @var resource */ return $this->imapStream; } @@ -646,11 +646,11 @@ public function getListingFolders(string $pattern = '*'): array public function searchMailbox(string $criteria = 'ALL', bool $disableServerEncoding = false): array { if ($disableServerEncoding) { - /** @psalm-var list */ + /* @psalm-var list */ return Imap::search($this->getImapStream(), $criteria, $this->imapSearchOption); } - /** @psalm-var list */ + /* @psalm-var list */ return Imap::search($this->getImapStream(), $criteria, $this->imapSearchOption, $this->getServerEncoding()); } @@ -739,7 +739,7 @@ public function deleteMail(int $mailId): void /** * Moves mails listed in mailId into new mailbox. * - * @param string|int $mailId a range or message number + * @param int|string $mailId a range or message number * @param string $mailBox Mailbox name * * @see imap_mail_move() @@ -753,7 +753,7 @@ public function moveMail($mailId, string $mailBox): void /** * Copies mails listed in mailId into new mailbox. * - * @param string|int $mailId a range or message number + * @param int|string $mailId a range or message number * @param string $mailBox Mailbox name * * @see imap_mail_copy() @@ -946,7 +946,7 @@ public function getMailsInfo(array $mailsIds): array } } - /** @var list */ + /* @var list */ return $mails; } @@ -998,7 +998,7 @@ public function getMailboxInfo(): stdClass * * @param int $criteria Sorting criteria (eg. SORTARRIVAL) * @param bool $reverse Sort reverse or not - * @param string|null $searchCriteria See http://php.net/imap_search for a complete list of available criteria + * @param null|string $searchCriteria See http://php.net/imap_search for a complete list of available criteria * * @psalm-param value-of $criteria * @@ -1041,7 +1041,7 @@ public function getQuotaLimit(string $quota_root = 'INBOX'): int { $quota = $this->getQuota($quota_root); - /** @var int */ + /* @var int */ return $quota['STORAGE']['limit'] ?? 0; } @@ -1050,13 +1050,13 @@ public function getQuotaLimit(string $quota_root = 'INBOX'): int * * @param string $quota_root Should normally be in the form of which mailbox (i.e. INBOX) * - * @return int|false FALSE in the case of call failure + * @return false|int FALSE in the case of call failure */ public function getQuotaUsage(string $quota_root = 'INBOX') { $quota = $this->getQuota($quota_root); - /** @var int|false */ + /* @var int|false */ return $quota['STORAGE']['usage'] ?? 0; } @@ -1289,7 +1289,7 @@ public function flattenParts(array $messageParts, array $flattenedParts = [], st ++$index; } - /** @var array */ + /* @var array */ return $flattenedParts; } @@ -1349,10 +1349,10 @@ public function downloadAttachment(DataPartInfo $dataInfo, array $params, object $fileName = $this->decodeRFC2231($fileName); } - /** @var scalar|array|object|null */ + /** @var null|array|object|scalar */ $sizeInBytes = $partStructure->bytes ?? null; - /** @var scalar|array|object|null */ + /** @var null|array|object|scalar */ $encoding = $partStructure->encoding ?? null; if (null !== $sizeInBytes && !\is_int($sizeInBytes)) { @@ -1380,7 +1380,7 @@ public function downloadAttachment(DataPartInfo $dataInfo, array $params, object $attachment->sizeInBytes = $sizeInBytes; $attachment->disposition = (isset($partStructure->disposition) && \is_string($partStructure->disposition)) ? $partStructure->disposition : null; - /** @var scalar|array|object|resource|null */ + /** @var null|array|object|resource|scalar */ $charset = $params['charset'] ?? null; if (isset($charset) && !\is_string($charset)) { @@ -1613,7 +1613,7 @@ public function unsubscribeMailbox(string $mailbox): void /** * Appends $message to $mailbox. * - * @param string|array $message + * @param array|string $message * * @psalm-param string|array{0:COMPOSE_ENVELOPE, 1:COMPOSE_BODY} $message * @@ -1719,7 +1719,7 @@ protected function initImapStream() } /** - * @param string|0 $partNum + * @param 0|string $partNum * * @psalm-param PARTSTRUCTURE $partStructure * @psalm-suppress InvalidArgument @@ -1902,7 +1902,7 @@ protected function possiblyGetEmailAndNameFromRecipient(object $recipient): ?arr $recipientMailbox = $recipient->mailbox; /** @var string */ $recipientHost = $recipient->host; - /** @var string|null */ + /** @var null|string */ $recipientPersonal = $recipient->personal ?? null; if (!\is_string($recipientMailbox)) { @@ -1944,7 +1944,7 @@ protected function possiblyGetMailboxes(array $t): array if (!\is_object($item)) { throw new UnexpectedValueException('Index '.(string) $index.' of argument 1 passed to '.__METHOD__.'() corresponds to a non-object value, '.\gettype($item).' given!'); } - /** @var scalar|array|object|resource|null */ + /** @var null|array|object|resource|scalar */ $item_name = $item->name ?? null; if (!isset($item->name, $item->attributes, $item->delimiter)) { @@ -1991,10 +1991,10 @@ protected function possiblyGetHostNameAndAddress(array $t): array } } - /** @var string */ + /* @var string */ $out[] = \strtolower($t[0]->mailbox.'@'.(string) $out[0]); - /** @var array{0:string|null, 1:string|null, 2:string} */ + /* @var array{0:string|null, 1:string|null, 2:string} */ return $out; } @@ -2063,7 +2063,7 @@ protected function searchMailboxMergeResultsWithOrWithoutDisablingServerEncoding $out = \array_merge($out, $this->searchMailbox($criterion, $disableServerEncoding)); } - /** @psalm-var list */ + /* @psalm-var list */ return \array_values(\array_unique($out, SORT_NUMERIC)); } } diff --git a/tests/unit/AbstractLiveMailboxTest.php b/tests/unit/AbstractLiveMailboxTest.php index f6791027..e16e889f 100644 --- a/tests/unit/AbstractLiveMailboxTest.php +++ b/tests/unit/AbstractLiveMailboxTest.php @@ -106,7 +106,7 @@ public function testAppend( $mailbox_args ); - /** @var Throwable|null */ + /** @var null|Throwable */ $exception = null; $mailboxDeleted = false; @@ -184,14 +184,14 @@ public function testAppend( */ protected function SubjectSearchCriteriaAndSubject(array $envelope): array { - /** @var string|null */ + /** @var null|string */ $subject = $envelope['subject'] ?? null; $this->assertIsString($subject); $search_criteria = \sprintf('SUBJECT "%s"', $subject); - /** @psalm-var array{0:string, 1:string} */ + /* @psalm-var array{0:string, 1:string} */ return [$search_criteria, $subject]; } diff --git a/tests/unit/Fixtures/DataPartInfo.php b/tests/unit/Fixtures/DataPartInfo.php index 7f012827..b815c445 100644 --- a/tests/unit/Fixtures/DataPartInfo.php +++ b/tests/unit/Fixtures/DataPartInfo.php @@ -8,7 +8,7 @@ class DataPartInfo extends Base { - /** @var string|null */ + /** @var null|string */ protected $data; public function fetch(): string diff --git a/tests/unit/Fixtures/IncomingMailAttachment.php b/tests/unit/Fixtures/IncomingMailAttachment.php index 65c31ac7..61e9823f 100644 --- a/tests/unit/Fixtures/IncomingMailAttachment.php +++ b/tests/unit/Fixtures/IncomingMailAttachment.php @@ -10,7 +10,7 @@ class IncomingMailAttachment extends Base { - /** @var string|null */ + /** @var null|string */ public $override_getFileInfo_mime_type = null; public function getFileInfo(int $fileinfo_const = FILEINFO_NONE): string diff --git a/tests/unit/ImapTest.php b/tests/unit/ImapTest.php index d5cd6fc3..fe20a337 100644 --- a/tests/unit/ImapTest.php +++ b/tests/unit/ImapTest.php @@ -120,7 +120,7 @@ public function testSortEmpty( \sys_get_temp_dir(), ]); - /** @var Throwable|null */ + /** @var null|Throwable */ $exception = null; $mailboxDeleted = false; diff --git a/tests/unit/IncomingMailTest.php b/tests/unit/IncomingMailTest.php index a43ca775..ac8ec5c7 100644 --- a/tests/unit/IncomingMailTest.php +++ b/tests/unit/IncomingMailTest.php @@ -35,7 +35,7 @@ public function testSetHeader(): void 'date', ] as $property ) { - /** @var scalar|array|object|resource|null */ + /** @var null|array|object|resource|scalar */ $headerPropertyValue = $header->$property; $this->assertSame($headerPropertyValue, $mail->$property); } diff --git a/tests/unit/LiveMailboxIssue514Test.php b/tests/unit/LiveMailboxIssue514Test.php index 1c8edba5..a48f4d63 100644 --- a/tests/unit/LiveMailboxIssue514Test.php +++ b/tests/unit/LiveMailboxIssue514Test.php @@ -35,7 +35,7 @@ public function testEmbed( string $attachmentsDir, string $serverEncoding = 'UTF-8' ): void { - /** @var Throwable|null */ + /** @var null|Throwable */ $exception = null; $mailboxDeleted = false; diff --git a/tests/unit/LiveMailboxTest.php b/tests/unit/LiveMailboxTest.php index f27de94a..76fa8618 100644 --- a/tests/unit/LiveMailboxTest.php +++ b/tests/unit/LiveMailboxTest.php @@ -66,7 +66,7 @@ public function testGetImapStream(HiddenString $imapPath, HiddenString $login, H $serverEncoding ); - /** @var Throwable|null */ + /** @var null|Throwable */ $exception = null; try { @@ -616,7 +616,8 @@ public function testAppendRetrievalMatchesExpected( $attachments = $mail->getAttachments(); - $this->assertCount(self::ISSUE_EXPECTED_ATTACHMENT_COUNT[ + $this->assertCount( + self::ISSUE_EXPECTED_ATTACHMENT_COUNT[ (int) $matches[1]], $attachments ); diff --git a/tests/unit/MailboxTest.php b/tests/unit/MailboxTest.php index 507ff596..bee69b7e 100644 --- a/tests/unit/MailboxTest.php +++ b/tests/unit/MailboxTest.php @@ -42,7 +42,7 @@ final class MailboxTest extends TestCase /** * Holds the imap username. * - * @var string|email + * @var email|string * * @psalm-var string */ @@ -374,7 +374,7 @@ public function testGetAttachmentsAreNotIgnoredByDefault(): void */ public function attachmentsIgnoreProvider(): array { - /** @psalm-var array */ + /* @psalm-var array */ return [ 'true' => [true], 'false' => [false], @@ -577,7 +577,7 @@ public function testMimeEncoding(string $str, string $expected): void */ public function timeoutsProvider(): array { - /** @psalm-var array}> */ + /* @psalm-var array}> */ return [ 'array(IMAP_OPENTIMEOUT)' => ['assertNull', 1, [IMAP_OPENTIMEOUT]], 'array(IMAP_READTIMEOUT)' => ['assertNull', 1, [IMAP_READTIMEOUT]],