aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/PocketImport.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-24 15:22:56 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commit0aa344dc247c77376fcbf2112191f9f8b3dfc846 (patch)
tree4b9b958e6652ae389af93e9ac2b6c05ec366fcd6 /src/Wallabag/ImportBundle/Import/PocketImport.php
parent5a4bbcc9a76fcdf54a6af25fcf7b26c9053a0ba3 (diff)
downloadwallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.tar.gz
wallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.tar.zst
wallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.zip
Update url & service name
Prefix ur with service namel: [service]_[route name] Add comment in Interface
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index ef8f9eb5..85bab0db 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -5,6 +5,7 @@ namespace Wallabag\ImportBundle\Import;
5use Doctrine\ORM\EntityManager; 5use Doctrine\ORM\EntityManager;
6use GuzzleHttp\Client; 6use GuzzleHttp\Client;
7use Symfony\Component\HttpFoundation\Session\Session; 7use Symfony\Component\HttpFoundation\Session\Session;
8use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
8use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
9use Wallabag\CoreBundle\Entity\Tag; 10use Wallabag\CoreBundle\Entity\Tag;
10use Wallabag\CoreBundle\Tools\Utils; 11use Wallabag\CoreBundle\Tools\Utils;
@@ -18,7 +19,7 @@ class PocketImport implements ImportInterface
18 private $skippedEntries = 0; 19 private $skippedEntries = 0;
19 private $importedEntries = 0; 20 private $importedEntries = 0;
20 21
21 public function __construct($tokenStorage, Session $session, EntityManager $em, $consumerKey) 22 public function __construct(TokenStorageInterface $tokenStorage, Session $session, EntityManager $em, $consumerKey)
22 { 23 {
23 $this->user = $tokenStorage->getToken()->getUser(); 24 $this->user = $tokenStorage->getToken()->getUser();
24 $this->session = $session; 25 $this->session = $session;
@@ -26,11 +27,17 @@ class PocketImport implements ImportInterface
26 $this->consumerKey = $consumerKey; 27 $this->consumerKey = $consumerKey;
27 } 28 }
28 29
30 /**
31 * {@inheritdoc}
32 */
29 public function getName() 33 public function getName()
30 { 34 {
31 return 'Pocket'; 35 return 'Pocket';
32 } 36 }
33 37
38 /**
39 * {@inheritdoc}
40 */
34 public function getDescription() 41 public function getDescription()
35 { 42 {
36 return 'This importer will import all your <a href="https://getpocket.com">Pocket</a> data.'; 43 return 'This importer will import all your <a href="https://getpocket.com">Pocket</a> data.';