]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
cs
[github/wallabag/wallabag.git] / src / Wallabag / AnnotationBundle / Controller / WallabagAnnotationController.php
index 5f981eb58522f200633257fe04aa0165b98b901f..4143c1b6c37beb9cda950f334b416572532d05fe 100644 (file)
@@ -3,7 +3,6 @@
 namespace Wallabag\AnnotationBundle\Controller;
 
 use FOS\RestBundle\Controller\FOSRestController;
-use Nelmio\ApiDocBundle\Annotation\ApiDoc;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
@@ -15,11 +14,9 @@ class WallabagAnnotationController extends FOSRestController
     /**
      * Retrieve annotations for an entry.
      *
-     * @ApiDoc(
-     *      requirements={
-     *          {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
-     *      }
-     * )
+     * @param Entry $entry
+     *
+     * @see Wallabag\ApiBundle\Controller\WallabagRestController
      *
      * @return Response
      */
@@ -30,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');
 
@@ -42,13 +39,7 @@ class WallabagAnnotationController extends FOSRestController
      *
      * @param Entry $entry
      *
-     * @ApiDoc(
-     *      requirements={
-     *          {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"},
-     *          {"name"="quote", "dataType"="string", "required"=false, "description"="Optional, quote for the annotation"},
-     *          {"name"="text", "dataType"="string", "required"=true, "description"=""},
-     *      }
-     * )
+     * @see Wallabag\ApiBundle\Controller\WallabagRestController
      *
      * @return Response
      */
@@ -81,11 +72,7 @@ class WallabagAnnotationController extends FOSRestController
     /**
      * Updates an annotation.
      *
-     * @ApiDoc(
-     *      requirements={
-     *          {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"}
-     *      }
-     * )
+     * @see Wallabag\ApiBundle\Controller\WallabagRestController
      *
      * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
      *
@@ -110,11 +97,7 @@ class WallabagAnnotationController extends FOSRestController
     /**
      * Removes an annotation.
      *
-     * @ApiDoc(
-     *      requirements={
-     *          {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"}
-     *      }
-     * )
+     * @see Wallabag\ApiBundle\Controller\WallabagRestController
      *
      * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
      *
@@ -141,6 +124,6 @@ class WallabagAnnotationController extends FOSRestController
      */
     private function renderJsonResponse($json, $code = 200)
     {
-        return new Response($json, $code, array('application/json'));
+        return new Response($json, $code, ['application/json']);
     }
 }