From d54c0033d379be474e6b92c042ef3dcaa7769ba5 Mon Sep 17 00:00:00 2001 From: Thorsten Suckow-Homberg Date: Wed, 9 Nov 2022 19:45:01 +0100 Subject: [PATCH] style: update sources according to coding standards --- src/Mail/Client/Data/MailAccount.php | 1 - src/Mail/Client/Util/JsonApiStrategy.php | 4 +--- src/Util/JsonStrategy.php | 1 - tests/Mail/Client/Data/MailAccountTest.php | 6 ------ .../Client/Imap/Util/DefaultFolderIdToTypeMapperTest.php | 8 ++++---- tests/Mail/Client/Util/JsonApiStrategyTest.php | 1 - 6 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Mail/Client/Data/MailAccount.php b/src/Mail/Client/Data/MailAccount.php index 57966942..975561a7 100644 --- a/src/Mail/Client/Data/MailAccount.php +++ b/src/Mail/Client/Data/MailAccount.php @@ -251,5 +251,4 @@ public function toJson(JsonStrategy $strategy = null): array { return $strategy ? $strategy->toJson($this) : $this->toArray(); } - } diff --git a/src/Mail/Client/Util/JsonApiStrategy.php b/src/Mail/Client/Util/JsonApiStrategy.php index 58cd8011..d413e8db 100644 --- a/src/Mail/Client/Util/JsonApiStrategy.php +++ b/src/Mail/Client/Util/JsonApiStrategy.php @@ -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. @@ -81,8 +80,7 @@ public function toJson(Arrayable $source): array continue; } - $result["attributes"][$field] =$value; - + $result["attributes"][$field] = $value; } return $result; diff --git a/src/Util/JsonStrategy.php b/src/Util/JsonStrategy.php index 5c6cf5e0..530ae2b0 100644 --- a/src/Util/JsonStrategy.php +++ b/src/Util/JsonStrategy.php @@ -35,7 +35,6 @@ */ interface JsonStrategy { - /** * Returns a JSON representation of the data passed to this method. * diff --git a/tests/Mail/Client/Data/MailAccountTest.php b/tests/Mail/Client/Data/MailAccountTest.php index 6a6bb5ce..11651759 100644 --- a/tests/Mail/Client/Data/MailAccountTest.php +++ b/tests/Mail/Client/Data/MailAccountTest.php @@ -159,11 +159,5 @@ public function testToJson() ->willReturn($account->toArray()); $this->assertEquals($config, $account->toJson($strategyMock)); - - - } - - - } diff --git a/tests/Mail/Client/Imap/Util/DefaultFolderIdToTypeMapperTest.php b/tests/Mail/Client/Imap/Util/DefaultFolderIdToTypeMapperTest.php index 3a7993c6..ab9c4f85 100644 --- a/tests/Mail/Client/Imap/Util/DefaultFolderIdToTypeMapperTest.php +++ b/tests/Mail/Client/Imap/Util/DefaultFolderIdToTypeMapperTest.php @@ -80,7 +80,6 @@ public function testGetFolderType() $this->assertSame( MailFolder::TYPE_DRAFT, $mapper->getFolderType($this->createListMailFolder("INBOX.Drafts", ".")) - ); $this->assertSame( MailFolder::TYPE_DRAFT, @@ -156,7 +155,8 @@ public function testGetFolderType() // FOLDER - foreach ([ + foreach ( + [ ["SomeRandomFolder/Draft", "/"], ["SomeRandomFolder/Draft/Test", "/"], ["SomeRandom", "."], @@ -164,7 +164,8 @@ public function testGetFolderType() ["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])) @@ -207,7 +208,6 @@ public function testGetFolderType() $mapper->getFolderType($this->createListMailFolder("[$label]/Trash", ".")) ); } - } diff --git a/tests/Mail/Client/Util/JsonApiStrategyTest.php b/tests/Mail/Client/Util/JsonApiStrategyTest.php index f6f296ec..18ac940b 100644 --- a/tests/Mail/Client/Util/JsonApiStrategyTest.php +++ b/tests/Mail/Client/Util/JsonApiStrategyTest.php @@ -89,6 +89,5 @@ public function testToJson() ] ] ], $strategy->toJson($arrayMock)); - } }