From 448d99f84e93697ce49ec31224addb1da1a37a9f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 28 Jan 2019 06:10:26 +0100 Subject: [PATCH] CS --- src/Wallabag/CoreBundle/Helper/DownloadImages.php | 2 +- src/Wallabag/CoreBundle/Helper/HttpClientFactory.php | 2 +- src/Wallabag/ImportBundle/Import/PocketImport.php | 7 +++---- tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php | 2 +- tests/Wallabag/ImportBundle/Import/PocketImportTest.php | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index e5749060..7a39a2e4 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -312,7 +312,7 @@ class DownloadImages * Retrieve and validate the extension from the response of the url of the image. * * @param ResponseInterface $res Http Response - * @param string $imagePath Path from the src image from the content (used for log only) + * @param string $imagePath Path from the src image from the content (used for log only) * * @return string|false Extension name or false if validation failed */ diff --git a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php index 3e19a7be..b8e95381 100644 --- a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php +++ b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php @@ -6,9 +6,9 @@ use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\Cookie\CookieJar; use GuzzleHttp\Event\SubscriberInterface; use Http\Adapter\Guzzle5\Client as GuzzleAdapter; -use Psr\Log\LoggerInterface; use Http\Client\HttpClient; use Http\HttplugBundle\ClientFactory\ClientFactory; +use Psr\Log\LoggerInterface; /** * Builds and configures the HTTP client. diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 9467fae2..b35a561b 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -5,12 +5,12 @@ namespace Wallabag\ImportBundle\Import; use Http\Client\Common\HttpMethodsClient; use Http\Client\Common\Plugin\ErrorPlugin; use Http\Client\Common\PluginClient; +use Http\Client\Exception\RequestException; use Http\Client\HttpClient; use Http\Discovery\MessageFactoryDiscovery; use Http\Message\MessageFactory; -use Http\Client\Exception\RequestException; -use Wallabag\CoreBundle\Entity\Entry; use Psr\Http\Message\ResponseInterface; +use Wallabag\CoreBundle\Entity\Entry; class PocketImport extends AbstractImport { @@ -88,7 +88,6 @@ class PocketImport extends AbstractImport */ public function authorize($code) { - try { $response = $this->client->post('https://getpocket.com/v3/oauth/authorize', [], json_encode([ 'consumer_key' => $this->user->getConfig()->getPocketConsumerKey(), @@ -153,7 +152,7 @@ class PocketImport extends AbstractImport /** * Set the Http client. * - * @param HttpClient $client + * @param HttpClient $client * @param MessageFactory|null $messageFactory */ public function setClient(HttpClient $client, MessageFactory $messageFactory = null) diff --git a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php index 53758364..0199b3e4 100644 --- a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php +++ b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php @@ -3,10 +3,10 @@ namespace Tests\Wallabag\CoreBundle\Helper; use GuzzleHttp\Client; +use GuzzleHttp\Psr7\Response; use GuzzleHttp\Stream\Stream; use GuzzleHttp\Subscriber\Mock; use Http\Mock\Client as HttpMockClient; -use GuzzleHttp\Psr7\Response; use Monolog\Handler\TestHandler; use Monolog\Logger; use PHPUnit\Framework\TestCase; diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php index ec76f168..40e1626b 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php @@ -2,8 +2,8 @@ namespace Tests\Wallabag\ImportBundle\Import; -use Http\Mock\Client as HttpMockClient; use GuzzleHttp\Psr7\Response; +use Http\Mock\Client as HttpMockClient; use M6Web\Component\RedisMock\RedisMockFactory; use Monolog\Handler\TestHandler; use Monolog\Logger; -- 2.41.0