X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FAnnotationBundle%2FController%2FWallabagAnnotationController.php;h=c13a034ffe58f27c2f7fab0a388ef0e686fed4b6;hb=0c271b9eb0813162b82c6b3bc38604716398ddd1;hp=b04c0bc24d630d37c6176c30a0c7f27c5cf90db4;hpb=1eea248bb0ebf49772878557211817905a4d6952;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index b04c0bc2..c13a034f 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php @@ -5,7 +5,6 @@ namespace Wallabag\AnnotationBundle\Controller; use FOS\RestBundle\Controller\FOSRestController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Wallabag\AnnotationBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; @@ -28,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'); @@ -39,10 +38,11 @@ class WallabagAnnotationController extends FOSRestController * Creates a new annotation. * * @param Request $request - * @param Entry $entry + * @param Entry $entry + * * @return JsonResponse - * @see Wallabag\ApiBundle\Controller\WallabagRestController * + * @see Wallabag\ApiBundle\Controller\WallabagRestController */ public function postAnnotationAction(Request $request, Entry $entry) { @@ -78,7 +78,8 @@ class WallabagAnnotationController extends FOSRestController * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") * * @param Annotation $annotation - * @param Request $request + * @param Request $request + * * @return JsonResponse */ public function putAnnotationAction(Annotation $annotation, Request $request) @@ -105,6 +106,7 @@ class WallabagAnnotationController extends FOSRestController * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") * * @param Annotation $annotation + * * @return JsonResponse */ public function deleteAnnotationAction(Annotation $annotation)