diff options
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; | |||
6 | use GuzzleHttp\Cookie\CookieJar; | 6 | use GuzzleHttp\Cookie\CookieJar; |
7 | use GuzzleHttp\Event\SubscriberInterface; | 7 | use GuzzleHttp\Event\SubscriberInterface; |
8 | use Http\Adapter\Guzzle5\Client as GuzzleAdapter; | 8 | use Http\Adapter\Guzzle5\Client as GuzzleAdapter; |
9 | use Psr\Log\LoggerInterface; | ||
10 | use Http\Client\HttpClient; | 9 | use Http\Client\HttpClient; |
11 | use Http\HttplugBundle\ClientFactory\ClientFactory; | 10 | use Http\HttplugBundle\ClientFactory\ClientFactory; |
11 | use 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; | |||
5 | use Http\Client\Common\HttpMethodsClient; | 5 | use Http\Client\Common\HttpMethodsClient; |
6 | use Http\Client\Common\Plugin\ErrorPlugin; | 6 | use Http\Client\Common\Plugin\ErrorPlugin; |
7 | use Http\Client\Common\PluginClient; | 7 | use Http\Client\Common\PluginClient; |
8 | use Http\Client\Exception\RequestException; | ||
8 | use Http\Client\HttpClient; | 9 | use Http\Client\HttpClient; |
9 | use Http\Discovery\MessageFactoryDiscovery; | 10 | use Http\Discovery\MessageFactoryDiscovery; |
10 | use Http\Message\MessageFactory; | 11 | use Http\Message\MessageFactory; |
11 | use Http\Client\Exception\RequestException; | ||
12 | use Wallabag\CoreBundle\Entity\Entry; | ||
13 | use Psr\Http\Message\ResponseInterface; | 12 | use Psr\Http\Message\ResponseInterface; |
13 | use Wallabag\CoreBundle\Entity\Entry; | ||
14 | 14 | ||
15 | class PocketImport extends AbstractImport | 15 | class 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 @@ | |||
3 | namespace Tests\Wallabag\CoreBundle\Helper; | 3 | namespace Tests\Wallabag\CoreBundle\Helper; |
4 | 4 | ||
5 | use GuzzleHttp\Client; | 5 | use GuzzleHttp\Client; |
6 | use GuzzleHttp\Psr7\Response; | ||
6 | use GuzzleHttp\Stream\Stream; | 7 | use GuzzleHttp\Stream\Stream; |
7 | use GuzzleHttp\Subscriber\Mock; | 8 | use GuzzleHttp\Subscriber\Mock; |
8 | use Http\Mock\Client as HttpMockClient; | 9 | use Http\Mock\Client as HttpMockClient; |
9 | use GuzzleHttp\Psr7\Response; | ||
10 | use Monolog\Handler\TestHandler; | 10 | use Monolog\Handler\TestHandler; |
11 | use Monolog\Logger; | 11 | use Monolog\Logger; |
12 | use PHPUnit\Framework\TestCase; | 12 | 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 @@ | |||
2 | 2 | ||
3 | namespace Tests\Wallabag\ImportBundle\Import; | 3 | namespace Tests\Wallabag\ImportBundle\Import; |
4 | 4 | ||
5 | use Http\Mock\Client as HttpMockClient; | ||
6 | use GuzzleHttp\Psr7\Response; | 5 | use GuzzleHttp\Psr7\Response; |
6 | use Http\Mock\Client as HttpMockClient; | ||
7 | use M6Web\Component\RedisMock\RedisMockFactory; | 7 | use M6Web\Component\RedisMock\RedisMockFactory; |
8 | use Monolog\Handler\TestHandler; | 8 | use Monolog\Handler\TestHandler; |
9 | use Monolog\Logger; | 9 | use Monolog\Logger; |