Skip to content

Commit

Permalink
style: update sources according to coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorsten Suckow-Homberg committed Nov 9, 2022
1 parent 40bcb6a commit d54c003
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/Mail/Client/Data/MailAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,4 @@ public function toJson(JsonStrategy $strategy = null): array
{
return $strategy ? $strategy->toJson($this) : $this->toArray();
}

}
4 changes: 1 addition & 3 deletions src/Mail/Client/Util/JsonApiStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
*/
class JsonApiStrategy implements JsonStrategy
{

/**
* Transforms the $data to a format that matches the JSON:API specifications by considering
* attributes and relationships.
Expand Down Expand Up @@ -81,8 +80,7 @@ public function toJson(Arrayable $source): array
continue;
}

$result["attributes"][$field] =$value;

$result["attributes"][$field] = $value;
}

return $result;
Expand Down
1 change: 0 additions & 1 deletion src/Util/JsonStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
*/
interface JsonStrategy
{

/**
* Returns a JSON representation of the data passed to this method.
*
Expand Down
6 changes: 0 additions & 6 deletions tests/Mail/Client/Data/MailAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,5 @@ public function testToJson()
->willReturn($account->toArray());

$this->assertEquals($config, $account->toJson($strategyMock));



}



}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function testGetFolderType()
$this->assertSame(
MailFolder::TYPE_DRAFT,
$mapper->getFolderType($this->createListMailFolder("INBOX.Drafts", "."))

);
$this->assertSame(
MailFolder::TYPE_DRAFT,
Expand Down Expand Up @@ -156,15 +155,17 @@ public function testGetFolderType()


// FOLDER
foreach ([
foreach (
[
["SomeRandomFolder/Draft", "/"],
["SomeRandomFolder/Draft/Test", "/"],
["SomeRandom", "."],
["INBOX/Somefolder/Deep/Drafts", "/"],
["INBOX.Trash.Deep.Deeper.Folder", "."],
["Junk/Draft", "/"],
["TRASH.Draft.folder", "."]
] as $folder) {
] as $folder
) {
$this->assertSame(
MailFolder::TYPE_FOLDER,
$mapper->getFolderType($this->createListMailFolder($folder[0], $folder[1]))
Expand Down Expand Up @@ -207,7 +208,6 @@ public function testGetFolderType()
$mapper->getFolderType($this->createListMailFolder("[$label]/Trash", "."))
);
}

}


Expand Down
1 change: 0 additions & 1 deletion tests/Mail/Client/Util/JsonApiStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ public function testToJson()
]
]
], $strategy->toJson($arrayMock));

}
}

0 comments on commit d54c003

Please sign in to comment.