From 0c271b9eb0813162b82c6b3bc38604716398ddd1 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 9 Oct 2016 14:01:28 +0200 Subject: fix cs and phpdoc --- .../Controller/WallabagAnnotationController.php | 2 +- .../Controller/WallabagRestController.php | 24 ++++++---------------- 2 files changed, 7 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index 519fd2f5..c13a034f 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php @@ -27,7 +27,7 @@ class WallabagAnnotationController extends FOSRestController ->getRepository('WallabagAnnotationBundle:Annotation') ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); $total = count($annotationRows); - $annotations = array('total' => $total, 'rows' => $annotationRows); + $annotations = ['total' => $total, 'rows' => $annotationRows]; $json = $this->get('serializer')->serialize($annotations, 'json'); diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index b30ab267..0c709ca0 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -536,12 +536,9 @@ class WallabagRestController extends FOSRestController { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', - [ - 'entry' => $entry, - ]); - - return $response; + return $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', [ + 'entry' => $entry, + ]); } /** @@ -563,13 +560,10 @@ class WallabagRestController extends FOSRestController { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', [ 'request' => $request, 'entry' => $entry, ]); - - return $response; } /** @@ -592,13 +586,10 @@ class WallabagRestController extends FOSRestController { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', [ 'annotation' => $annotation, 'request' => $request, ]); - - return $response; } /** @@ -620,12 +611,9 @@ class WallabagRestController extends FOSRestController { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', [ 'annotation' => $annotation, ]); - - return $response; } /** -- cgit v1.2.3