Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Header/GenericHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function setFieldName($fieldName)
// Validate what we have
if (!preg_match('/^[a-z][a-z0-9-]*$/i', $fieldName)) {
throw new Exception\InvalidArgumentException(
'Header name must start with a letter, and consists of only letters, numbers and dashes.'
'Header name must start with a letter, and consist of only letters, numbers and dashes.'
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Protocol/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public function fetch($items, $from, $to = null)
} elseif ($to === INF) {
$set = (int) $from . ':*';
} else {
$set = (int) $from . ':' . (int)$to;
$set = (int) $from . ':' . (int) $to;
}

$items = (array) $items;
Expand Down
2 changes: 1 addition & 1 deletion src/Protocol/Pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function getList($msgno = null)
$line = strtok($result, "\n");
while ($line) {
list($no, $size) = explode(' ', trim($line));
$messages[(int)$no] = (int) $size;
$messages[(int) $no] = (int) $size;
$line = strtok("\n");
}

Expand Down
2 changes: 1 addition & 1 deletion src/Transport/FileOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function setCallback($callback)
public function getCallback()
{
if (null === $this->callback) {
$this->setCallback(function($transport) {
$this->setCallback(function ($transport) {
return 'ZendMail_' . time() . '_' . mt_rand() . '.tmp';
});
}
Expand Down
5 changes: 2 additions & 3 deletions src/Transport/Sendmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Zend\Mail;
use Zend\Mail\Address\AddressInterface;
use Zend\Mail\Exception;
use Zend\Mail\Headers;
use Zend\Mail\Header\HeaderInterface;

/**
Expand Down Expand Up @@ -245,15 +244,15 @@ protected function prepareParameters(Mail\Message $message)

$sender = $message->getSender();
if ($sender instanceof AddressInterface) {
$parameters .= ' -r ' . $sender->getEmail();
$parameters .= ' -f ' . $sender->getEmail();
return $parameters;
}

$from = $message->getFrom();
if (count($from)) {
$from->rewind();
$sender = $from->current();
$parameters .= ' -r ' . $sender->getEmail();
$parameters .= ' -f ' . $sender->getEmail();
return $parameters;
}

Expand Down
2 changes: 1 addition & 1 deletion test/Transport/FileOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testPathIsMutable()
public function testCallbackIsMutable()
{
$original = $this->options->getCallback();
$new = function($transport) {};
$new = function ($transport) {};
$this->options->setCallback($new);
$test = $this->options->getCallback();
$this->assertNotSame($original, $test);
Expand Down
4 changes: 2 additions & 2 deletions test/Transport/SendmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function setUp()
{
$this->transport = new Sendmail();
$self = $this;
$this->transport->setCallable(function($to, $subject, $message, $additional_headers, $additional_parameters = null) use ($self) {
$this->transport->setCallable(function ($to, $subject, $message, $additional_headers, $additional_parameters = null) use ($self) {
$self->to = $to;
$self->subject = $subject;
$self->message = $message;
Expand Down Expand Up @@ -89,7 +89,7 @@ public function testReceivesMailArtifactsOnUnixSystems()
$this->assertContains("From: zf-devteam@zend.com,\r\n Matthew <matthew@zend.com>\r\n", $this->additional_headers);
$this->assertContains("X-Foo-Bar: Matthew\r\n", $this->additional_headers);
$this->assertContains("Sender: Ralph Schindler <ralph.schindler@zend.com>\r\n", $this->additional_headers);
$this->assertEquals('-R hdrs -r ralph.schindler@zend.com', $this->additional_parameters);
$this->assertEquals('-R hdrs -f ralph.schindler@zend.com', $this->additional_parameters);
}

public function testReceivesMailArtifactsOnWindowsSystems()
Expand Down

0 comments on commit 6a060b9

Please sign in to comment.