diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-01-28 06:10:26 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-28 11:42:27 +0200 |
commit | 448d99f84e93697ce49ec31224addb1da1a37a9f (patch) | |
tree | dac85bc07ca0e6cf253d90b859811eaff28a4bd4 /src | |
parent | 1048c9c4a811821b00cc04bfec905bebcc22bac4 (diff) | |
download | wallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.tar.gz wallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.tar.zst wallabag-448d99f84e93697ce49ec31224addb1da1a37a9f.zip |
CS
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/DownloadImages.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/HttpClientFactory.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 7 |
3 files changed, 5 insertions, 6 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) |