diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-10-09 14:01:28 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-22 09:06:07 +0200 |
commit | 0c271b9eb0813162b82c6b3bc38604716398ddd1 (patch) | |
tree | 0739a26c4e2a973013d4d38bcd2e8075f19d6093 /src/Wallabag | |
parent | b1e92f8c14d3d506f2bfab628ba8ed95de0e8b51 (diff) | |
download | wallabag-0c271b9eb0813162b82c6b3bc38604716398ddd1.tar.gz wallabag-0c271b9eb0813162b82c6b3bc38604716398ddd1.tar.zst wallabag-0c271b9eb0813162b82c6b3bc38604716398ddd1.zip |
fix cs and phpdoc
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 24 |
2 files changed, 7 insertions, 19 deletions
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 | |||
27 | ->getRepository('WallabagAnnotationBundle:Annotation') | 27 | ->getRepository('WallabagAnnotationBundle:Annotation') |
28 | ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); | 28 | ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); |
29 | $total = count($annotationRows); | 29 | $total = count($annotationRows); |
30 | $annotations = array('total' => $total, 'rows' => $annotationRows); | 30 | $annotations = ['total' => $total, 'rows' => $annotationRows]; |
31 | 31 | ||
32 | $json = $this->get('serializer')->serialize($annotations, 'json'); | 32 | $json = $this->get('serializer')->serialize($annotations, 'json'); |
33 | 33 | ||
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 | |||
536 | { | 536 | { |
537 | $this->validateAuthentication(); | 537 | $this->validateAuthentication(); |
538 | 538 | ||
539 | $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', | 539 | return $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', [ |
540 | [ | 540 | 'entry' => $entry, |
541 | 'entry' => $entry, | 541 | ]); |
542 | ]); | ||
543 | |||
544 | return $response; | ||
545 | } | 542 | } |
546 | 543 | ||
547 | /** | 544 | /** |
@@ -563,13 +560,10 @@ class WallabagRestController extends FOSRestController | |||
563 | { | 560 | { |
564 | $this->validateAuthentication(); | 561 | $this->validateAuthentication(); |
565 | 562 | ||
566 | $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', | 563 | return $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', [ |
567 | [ | ||
568 | 'request' => $request, | 564 | 'request' => $request, |
569 | 'entry' => $entry, | 565 | 'entry' => $entry, |
570 | ]); | 566 | ]); |
571 | |||
572 | return $response; | ||
573 | } | 567 | } |
574 | 568 | ||
575 | /** | 569 | /** |
@@ -592,13 +586,10 @@ class WallabagRestController extends FOSRestController | |||
592 | { | 586 | { |
593 | $this->validateAuthentication(); | 587 | $this->validateAuthentication(); |
594 | 588 | ||
595 | $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', | 589 | return $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', [ |
596 | [ | ||
597 | 'annotation' => $annotation, | 590 | 'annotation' => $annotation, |
598 | 'request' => $request, | 591 | 'request' => $request, |
599 | ]); | 592 | ]); |
600 | |||
601 | return $response; | ||
602 | } | 593 | } |
603 | 594 | ||
604 | /** | 595 | /** |
@@ -620,12 +611,9 @@ class WallabagRestController extends FOSRestController | |||
620 | { | 611 | { |
621 | $this->validateAuthentication(); | 612 | $this->validateAuthentication(); |
622 | 613 | ||
623 | $response = $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', | 614 | return $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation', [ |
624 | [ | ||
625 | 'annotation' => $annotation, | 615 | 'annotation' => $annotation, |
626 | ]); | 616 | ]); |
627 | |||
628 | return $response; | ||
629 | } | 617 | } |
630 | 618 | ||
631 | /** | 619 | /** |