diff --git a/src/Protocol/Imap.php b/src/Protocol/Imap.php index d8b20724..ce9f87da 100644 --- a/src/Protocol/Imap.php +++ b/src/Protocol/Imap.php @@ -380,7 +380,7 @@ public function requestAndResponse($command, $tokens = [], $dontParse = false) /** * escape one or more literals i.e. for sendRequest * - * @param string|array $string the literal/-s + * @param string $string the literal/-s * @return string|array escape literals, literals with newline ar returned * as array('{size}', 'string'); */ diff --git a/src/Transport/Envelope.php b/src/Transport/Envelope.php index a1e9bc51..c63605dd 100644 --- a/src/Transport/Envelope.php +++ b/src/Transport/Envelope.php @@ -4,6 +4,9 @@ use Laminas\Stdlib\AbstractOptions; +/** + * @extends AbstractOptions> + */ class Envelope extends AbstractOptions { /** @var string|null */ diff --git a/src/Transport/FileOptions.php b/src/Transport/FileOptions.php index 6f21cb87..8647ad1f 100644 --- a/src/Transport/FileOptions.php +++ b/src/Transport/FileOptions.php @@ -16,6 +16,9 @@ use function sys_get_temp_dir; use function time; +/** + * @extends AbstractOptions + */ class FileOptions extends AbstractOptions { /** @var string Path to stored mail files */ diff --git a/src/Transport/SmtpOptions.php b/src/Transport/SmtpOptions.php index 59984706..f2d2ef62 100644 --- a/src/Transport/SmtpOptions.php +++ b/src/Transport/SmtpOptions.php @@ -11,6 +11,9 @@ use function is_string; use function sprintf; +/** + * @extends AbstractOptions + */ class SmtpOptions extends AbstractOptions { /** @var string Local client hostname */ diff --git a/test/Header/HeaderWrapTest.php b/test/Header/HeaderWrapTest.php index 3de8f249..15a7ccdd 100644 --- a/test/Header/HeaderWrapTest.php +++ b/test/Header/HeaderWrapTest.php @@ -29,7 +29,7 @@ public function testWrapUnstructuredHeaderAscii(): void $header = $this->createMock(UnstructuredInterface::class); $header->expects($this->any()) ->method('getEncoding') - ->will($this->returnValue('ASCII')); + ->willReturn('ASCII'); $expected = wordwrap($string, 78, "\r\n "); $test = HeaderWrap::wrap($string, $header); @@ -45,7 +45,7 @@ public function testWrapUnstructuredHeaderMime(): void $header = $this->createMock(UnstructuredInterface::class); $header->expects($this->any()) ->method('getEncoding') - ->will($this->returnValue('UTF-8')); + ->willReturn('UTF-8'); $expected = "=?UTF-8?Q?foobarblahblahblah=20baz=20batfoobarblahblahblah=20baz=20?=\r\n" . " =?UTF-8?Q?batfoobarblahblahblah=20baz=20bat?="; diff --git a/test/Transport/SmtpTest.php b/test/Transport/SmtpTest.php index 88895e80..2e05dfda 100644 --- a/test/Transport/SmtpTest.php +++ b/test/Transport/SmtpTest.php @@ -16,7 +16,6 @@ use ReflectionClass; use function explode; -use function sprintf; use function str_repeat; use function strlen; use function substr; @@ -231,7 +230,7 @@ public function testLongLinesFoldingRFC5322(): void $this->assertCount(28, $lines); foreach ($lines as $line) { - $this->assertLessThanOrEqual($maxLen, strlen($line), sprintf('Line is too long: ' . $line)); + $this->assertLessThanOrEqual($maxLen, strlen($line), 'Line is too long: ' . $line); } $this->assertStringNotContainsString(