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;
->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');
* 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)
{
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
- * @param Request $request
+ * @param Request $request
+ *
* @return JsonResponse
*/
public function putAnnotationAction(Annotation $annotation, Request $request)
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
+ *
* @return JsonResponse
*/
public function deleteAnnotationAction(Annotation $annotation)