aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-01-28 06:10:26 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-05-28 11:42:27 +0200
commit448d99f84e93697ce49ec31224addb1da1a37a9f (patch)
treedac85bc07ca0e6cf253d90b859811eaff28a4bd4
parent1048c9c4a811821b00cc04bfec905bebcc22bac4 (diff)
downloadwallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.tar.gz
wallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.tar.zst
wallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.zip
CS
-rw-r--r--src/Wallabag/CoreBundle/Helper/DownloadImages.php2
-rw-r--r--src/Wallabag/CoreBundle/Helper/HttpClientFactory.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php7
-rw-r--r--tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php2
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
312 * Retrieve and validate the extension from the response of the url of the image. 312 * Retrieve and validate the extension from the response of the url of the image.
313 * 313 *
314 * @param ResponseInterface $res Http Response 314 * @param ResponseInterface $res Http Response
315 * @param string $imagePath Path from the src image from the content (used for log only) 315 * @param string $imagePath Path from the src image from the content (used for log only)
316 * 316 *
317 * @return string|false Extension name or false if validation failed 317 * @return string|false Extension name or false if validation failed
318 */ 318 */
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;
6use GuzzleHttp\Cookie\CookieJar; 6use GuzzleHttp\Cookie\CookieJar;
7use GuzzleHttp\Event\SubscriberInterface; 7use GuzzleHttp\Event\SubscriberInterface;
8use Http\Adapter\Guzzle5\Client as GuzzleAdapter; 8use Http\Adapter\Guzzle5\Client as GuzzleAdapter;
9use Psr\Log\LoggerInterface;
10use Http\Client\HttpClient; 9use Http\Client\HttpClient;
11use Http\HttplugBundle\ClientFactory\ClientFactory; 10use Http\HttplugBundle\ClientFactory\ClientFactory;
11use Psr\Log\LoggerInterface;
12 12
13/** 13/**
14 * Builds and configures the HTTP client. 14 * 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;
5use Http\Client\Common\HttpMethodsClient; 5use Http\Client\Common\HttpMethodsClient;
6use Http\Client\Common\Plugin\ErrorPlugin; 6use Http\Client\Common\Plugin\ErrorPlugin;
7use Http\Client\Common\PluginClient; 7use Http\Client\Common\PluginClient;
8use Http\Client\Exception\RequestException;
8use Http\Client\HttpClient; 9use Http\Client\HttpClient;
9use Http\Discovery\MessageFactoryDiscovery; 10use Http\Discovery\MessageFactoryDiscovery;
10use Http\Message\MessageFactory; 11use Http\Message\MessageFactory;
11use Http\Client\Exception\RequestException;
12use Wallabag\CoreBundle\Entity\Entry;
13use Psr\Http\Message\ResponseInterface; 12use Psr\Http\Message\ResponseInterface;
13use Wallabag\CoreBundle\Entity\Entry;
14 14
15class PocketImport extends AbstractImport 15class PocketImport extends AbstractImport
16{ 16{
@@ -88,7 +88,6 @@ class PocketImport extends AbstractImport
88 */ 88 */
89 public function authorize($code) 89 public function authorize($code)
90 { 90 {
91
92 try { 91 try {
93 $response = $this->client->post('https://getpocket.com/v3/oauth/authorize', [], json_encode([ 92 $response = $this->client->post('https://getpocket.com/v3/oauth/authorize', [], json_encode([
94 'consumer_key' => $this->user->getConfig()->getPocketConsumerKey(), 93 'consumer_key' => $this->user->getConfig()->getPocketConsumerKey(),
@@ -153,7 +152,7 @@ class PocketImport extends AbstractImport
153 /** 152 /**
154 * Set the Http client. 153 * Set the Http client.
155 * 154 *
156 * @param HttpClient $client 155 * @param HttpClient $client
157 * @param MessageFactory|null $messageFactory 156 * @param MessageFactory|null $messageFactory
158 */ 157 */
159 public function setClient(HttpClient $client, MessageFactory $messageFactory = null) 158 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 @@
3namespace Tests\Wallabag\CoreBundle\Helper; 3namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use GuzzleHttp\Client; 5use GuzzleHttp\Client;
6use GuzzleHttp\Psr7\Response;
6use GuzzleHttp\Stream\Stream; 7use GuzzleHttp\Stream\Stream;
7use GuzzleHttp\Subscriber\Mock; 8use GuzzleHttp\Subscriber\Mock;
8use Http\Mock\Client as HttpMockClient; 9use Http\Mock\Client as HttpMockClient;
9use GuzzleHttp\Psr7\Response;
10use Monolog\Handler\TestHandler; 10use Monolog\Handler\TestHandler;
11use Monolog\Logger; 11use Monolog\Logger;
12use PHPUnit\Framework\TestCase; 12use 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 @@
2 2
3namespace Tests\Wallabag\ImportBundle\Import; 3namespace Tests\Wallabag\ImportBundle\Import;
4 4
5use Http\Mock\Client as HttpMockClient;
6use GuzzleHttp\Psr7\Response; 5use GuzzleHttp\Psr7\Response;
6use Http\Mock\Client as HttpMockClient;
7use M6Web\Component\RedisMock\RedisMockFactory; 7use M6Web\Component\RedisMock\RedisMockFactory;
8use Monolog\Handler\TestHandler; 8use Monolog\Handler\TestHandler;
9use Monolog\Logger; 9use Monolog\Logger;