Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CS #47

Merged
merged 2 commits into from
Aug 19, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 4 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,9 @@ 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") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

) { should be on newline.

$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