aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-13 09:43:14 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-13 09:43:14 +0200
commitf2e5fdc3666a2a6525b4202ab48df05efeebaf5c (patch)
treef559474e248a33c472fe0b260641866be5c0def3 /src/Wallabag/ImportBundle/Controller
parenta417b869237763ee115982d6367a82aa6174d74e (diff)
parent86732aa01cf0ad0fb5279f38ce75a9bedbbb66e1 (diff)
downloadwallabag-f2e5fdc3666a2a6525b4202ab48df05efeebaf5c.tar.gz
wallabag-f2e5fdc3666a2a6525b4202ab48df05efeebaf5c.tar.zst
wallabag-f2e5fdc3666a2a6525b4202ab48df05efeebaf5c.zip
Merge pull request #1916 from wallabag/cleanup
Convert array + phpDoc
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php12
-rw-r--r--src/Wallabag/ImportBundle/Controller/WallabagController.php4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php
index 11ce649d..36ee25bf 100644
--- a/src/Wallabag/ImportBundle/Controller/PocketController.php
+++ b/src/Wallabag/ImportBundle/Controller/PocketController.php
@@ -17,10 +17,10 @@ class PocketController extends Controller
17 { 17 {
18 $pocket = $this->get('wallabag_import.pocket.import'); 18 $pocket = $this->get('wallabag_import.pocket.import');
19 $form = $this->createFormBuilder($pocket) 19 $form = $this->createFormBuilder($pocket)
20 ->add('mark_as_read', CheckboxType::class, array( 20 ->add('mark_as_read', CheckboxType::class, [
21 'label' => 'import.form.mark_as_read_label', 21 'label' => 'import.form.mark_as_read_label',
22 'required' => false, 22 'required' => false,
23 )) 23 ])
24 ->getForm(); 24 ->getForm();
25 25
26 return $this->render('WallabagImportBundle:Pocket:index.html.twig', [ 26 return $this->render('WallabagImportBundle:Pocket:index.html.twig', [
@@ -36,7 +36,7 @@ class PocketController extends Controller
36 public function authAction(Request $request) 36 public function authAction(Request $request)
37 { 37 {
38 $requestToken = $this->get('wallabag_import.pocket.import') 38 $requestToken = $this->get('wallabag_import.pocket.import')
39 ->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL)); 39 ->getRequestToken($this->generateUrl('import', [], UrlGeneratorInterface::ABSOLUTE_URL));
40 40
41 if (false === $requestToken) { 41 if (false === $requestToken) {
42 $this->get('session')->getFlashBag()->add( 42 $this->get('session')->getFlashBag()->add(
@@ -51,7 +51,7 @@ class PocketController extends Controller
51 $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']); 51 $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']);
52 52
53 return $this->redirect( 53 return $this->redirect(
54 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL), 54 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
55 301 55 301
56 ); 56 );
57 } 57 }
@@ -79,10 +79,10 @@ class PocketController extends Controller
79 79
80 if (true === $pocket->setMarkAsRead($markAsRead)->import()) { 80 if (true === $pocket->setMarkAsRead($markAsRead)->import()) {
81 $summary = $pocket->getSummary(); 81 $summary = $pocket->getSummary();
82 $message = $this->get('translator')->trans('flashes.import.notice.summary', array( 82 $message = $this->get('translator')->trans('flashes.import.notice.summary', [
83 '%imported%' => $summary['imported'], 83 '%imported%' => $summary['imported'],
84 '%skipped%' => $summary['skipped'], 84 '%skipped%' => $summary['skipped'],
85 )); 85 ]);
86 } 86 }
87 87
88 $this->get('session')->getFlashBag()->add( 88 $this->get('session')->getFlashBag()->add(
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagController.php b/src/Wallabag/ImportBundle/Controller/WallabagController.php
index 01883d4a..76ced0d2 100644
--- a/src/Wallabag/ImportBundle/Controller/WallabagController.php
+++ b/src/Wallabag/ImportBundle/Controller/WallabagController.php
@@ -55,10 +55,10 @@ abstract class WallabagController extends Controller
55 55
56 if (true === $res) { 56 if (true === $res) {
57 $summary = $wallabag->getSummary(); 57 $summary = $wallabag->getSummary();
58 $message = $this->get('translator')->trans('flashes.import.notice.summary', array( 58 $message = $this->get('translator')->trans('flashes.import.notice.summary', [
59 '%imported%' => $summary['imported'], 59 '%imported%' => $summary['imported'],
60 '%skipped%' => $summary['skipped'], 60 '%skipped%' => $summary['skipped'],
61 )); 61 ]);
62 62
63 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); 63 unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name);
64 } 64 }