X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FWallabagRestController.php;h=0c709ca099dfb964715338ce96ab413ef4310900;hb=0c271b9eb0813162b82c6b3bc38604716398ddd1;hp=e2e4924b6ef50d8d391f7e83d0c098b07a795123;hpb=1eea248bb0ebf49772878557211817905a4d6952;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index e2e4924b..0c709ca0 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -529,24 +529,24 @@ class WallabagRestController extends FOSRestController * ) * * @param Entry $entry + * * @return JsonResponse */ public function getAnnotationsAction(Entry $entry) { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', - [ - 'entry' => $entry - ]); - return $response; + return $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', [ + 'entry' => $entry, + ]); } /** * Creates a new annotation. * * @param Request $request - * @param Entry $entry + * @param Entry $entry + * * @return JsonResponse * @ApiDoc( * requirements={ @@ -555,18 +555,15 @@ class WallabagRestController extends FOSRestController * {"name"="text", "dataType"="string", "required"=true, "description"=""}, * } * ) - * */ public function postAnnotationAction(Request $request, Entry $entry) { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', [ 'request' => $request, - 'entry' => $entry + 'entry' => $entry, ]); - return $response; } /** @@ -581,19 +578,18 @@ class WallabagRestController 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) { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', [ 'annotation' => $annotation, - 'request' => $request + 'request' => $request, ]); - return $response; } /** @@ -608,17 +604,16 @@ class WallabagRestController extends FOSRestController * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") * * @param Annotation $annotation + * * @return JsonResponse */ public function deleteAnnotationAction(Annotation $annotation) { $this->validateAuthentication(); - $response = $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', - [ + return $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', [ 'annotation' => $annotation, ]); - return $response; } /**