]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/DeveloperController.php
Convert array + phpDoc
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / DeveloperController.php
index f519bdbcc21ac87ce4bc9b3c3750714532a7cf99..d85ba5ee4a30d82bb6ac8733daf22d7a8fd06bfe 100644 (file)
@@ -21,9 +21,9 @@ class DeveloperController extends Controller
     {
         $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll();
 
-        return $this->render('WallabagCoreBundle:Developer:index.html.twig', array(
+        return $this->render('WallabagCoreBundle:Developer:index.html.twig', [
             'clients' => $clients,
-        ));
+        ]);
     }
 
     /**
@@ -43,24 +43,24 @@ class DeveloperController extends Controller
         $clientForm->handleRequest($request);
 
         if ($clientForm->isValid()) {
-            $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password','refresh_token'));
+            $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
             $em->persist($client);
             $em->flush();
 
             $this->get('session')->getFlashBag()->add(
                 'notice',
-                'New client created.'
+                'flashes.developer.notice.client_created'
             );
 
-            return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', array(
+            return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [
                 'client_id' => $client->getPublicId(),
                 'client_secret' => $client->getSecret(),
-            ));
+            ]);
         }
 
-        return $this->render('WallabagCoreBundle:Developer:client.html.twig', array(
+        return $this->render('WallabagCoreBundle:Developer:client.html.twig', [
             'form' => $clientForm->createView(),
-        ));
+        ]);
     }
 
     /**
@@ -80,7 +80,7 @@ class DeveloperController extends Controller
 
         $this->get('session')->getFlashBag()->add(
             'notice',
-            'Client deleted'
+            'flashes.developer.notice.client_deleted'
         );
 
         return $this->redirect($this->generateUrl('developer'));