Skip to content

Commit

Permalink
Fix bad class import; update var_export calls with corret types
Browse files Browse the repository at this point in the history
Signed-off-by: Filippo Tessarotto <zoeslam@gmail.com>
  • Loading branch information
Slamdunk committed Aug 2, 2022
1 parent 5543689 commit 7ed01b6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/AddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function addMany(array $addresses)
if (! is_string($key)) {
throw new Exception\RuntimeException(sprintf(
'Invalid key type in provided addresses array ("%s")',
is_object($key) ? get_class($key) : var_export($key, 1)
is_object($key) ? get_class($key) : var_export($key, true)
));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Header/ContentDisposition.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function fromString($headerLine)

if (! is_numeric($count)) {
$type = gettype($count);
$value = var_export($count, 1);
$value = var_export($count, true);
throw new Exception\InvalidArgumentException(sprintf(
"Invalid header line for Content-Disposition string"
. " - count expected to be numeric, got %s with value %s",
Expand Down
3 changes: 1 addition & 2 deletions src/Protocol/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Laminas\Mail\Protocol;

use Exception;
use Generator;
use Laminas\Mail\Headers;

Expand Down Expand Up @@ -321,7 +320,7 @@ public function hasSession()
* Send EHLO or HELO depending on capabilities of smtp host
*
* @param string $host The client hostname or IP address (default: 127.0.0.1)
* @throws Exception|Exception\ExceptionInterface
* @throws Exception\ExceptionInterface
*/
protected function ehlo($host)
{
Expand Down
4 changes: 2 additions & 2 deletions test/Storage/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ public function testMessageFlagsAreSet(): void
$message = new Message(['flags' => $origFlags]);

$messageFlags = $message->getFlags();
$this->assertTrue($message->hasFlag('bar'), var_export($messageFlags, 1));
$this->assertTrue($message->hasFlag('bat'), var_export($messageFlags, 1));
$this->assertTrue($message->hasFlag('bar'), var_export($messageFlags, true));
$this->assertTrue($message->hasFlag('bat'), var_export($messageFlags, true));
$this->assertEquals(['bar' => 'bar', 'bat' => 'bat'], $messageFlags);
}

Expand Down

0 comments on commit 7ed01b6

Please sign in to comment.