aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Controller
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 11:36:01 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 12:25:29 +0200
commit4094ea47712efbe58624ff74daeb1f77c9b0edcf (patch)
tree3d2c168092d0208e6ba888de969252a54bf0c6c1 /src/Wallabag/ImportBundle/Controller
parent7eccbda99f16dc39ee01a0c81ab88293e9b268fd (diff)
downloadwallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.gz
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.zst
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.zip
Convert array + phpDoc
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
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 }