Skip to content

Commit

Permalink
Merge pull request #47 from xelan/fix-cs
Browse files Browse the repository at this point in the history
Fix CS
  • Loading branch information
ddeboer committed Aug 19, 2014
2 parents a97185e + 8a5fa5f commit d9f264a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Ddeboer/Imap/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ public function hasAttachments()

/**
* Delete message
*
* @throws MessageDeleteException
*/
public function delete()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Ddeboer/Imap/Message/EmailAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getFullAddress()
if ($this->name) {
$address = sprintf("%s <%s@%s>", $this->name, $this->mailbox, $this->hostname);
} else {
$address = sprintf("%s@%s",$this->mailbox, $this->hostname);
$address = sprintf("%s@%s", $this->mailbox, $this->hostname);
}

return $address;
Expand Down
8 changes: 5 additions & 3 deletions src/Ddeboer/Imap/Message/Part.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function getDecodedContent()
if (null === $this->decodedContent) {
switch ($this->getEncoding()) {
case self::ENCODING_BASE64:
$this->decodedContent = \base64_decode($this->getContent());
$this->decodedContent = \base64_decode($this->getContent());
break;

case self::ENCODING_QUOTED_PRINTABLE:
Expand Down Expand Up @@ -236,8 +236,10 @@ protected function parseStructure(\stdClass $structure)
}

if (isset($partStructure->disposition)
&& (strtolower($partStructure->disposition) == 'attachment' || strtolower($partStructure->disposition) == 'inline' )
&& strtoupper ($partStructure->subtype) != "PLAIN") {
&& (strtolower($partStructure->disposition) == 'attachment'
|| strtolower($partStructure->disposition) == 'inline')
&& strtoupper($partStructure->subtype) != "PLAIN"
) {
$attachment = new Attachment($this->stream, $this->messageNumber, $partNumber, $partStructure);
$this->parts[] = $attachment;
} else {
Expand Down
12 changes: 10 additions & 2 deletions tests/Ddeboer/Imap/Tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ public function testCreateMailbox()

$name = 'test' . uniqid();
$mailbox = $connection->createMailbox($name);
$this->assertEquals($name, $mailbox->getName(), 'Correct mailbox must be returned from create');
$this->assertEquals($name, $connection->getMailbox($name)->getName(), 'Correct mailbox must be returned from connection');
$this->assertEquals(
$name,
$mailbox->getName(),
'Correct mailbox must be returned from create'
);
$this->assertEquals(
$name,
$connection->getMailbox($name)->getName(),
'Correct mailbox must be returned from connection'
);

$mailbox->delete();
$connection->getMailbox($name);
Expand Down

0 comments on commit d9f264a

Please sign in to comment.