From 2a1ceb67b4400f46f4d3067e887ff54aa906f0a2 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Wed, 5 Sep 2018 14:25:32 +0200 Subject: php-cs-fixer Signed-off-by: Kevin Decherf --- .../AnnotationBundle/Controller/WallabagAnnotationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/AnnotationBundle') diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index f3090e65..3a7421c7 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php @@ -28,7 +28,7 @@ class WallabagAnnotationController extends FOSRestController ->getDoctrine() ->getRepository('WallabagAnnotationBundle:Annotation') ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); - $total = count($annotationRows); + $total = \count($annotationRows); $annotations = ['total' => $total, 'rows' => $annotationRows]; $json = $this->get('jms_serializer')->serialize($annotations, 'json'); -- cgit v1.2.3 From 69b563948de3b293fee47f60bde3f63d512b13c5 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 2 Sep 2018 17:32:32 +0200 Subject: AnnotationRepository: rename getBuilderByUser We rename getBuilderByUser to getSortedQueryBuilderByUser as long as the method currently returns a QueryBuilder with an orderBy() Signed-off-by: Kevin Decherf --- src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/AnnotationBundle') diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index b44f7e64..0de5c934 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php @@ -21,7 +21,7 @@ class AnnotationRepository extends EntityRepository public function getBuilderForAllByUser($userId) { return $this - ->getBuilderByUser($userId) + ->getSortedQueryBuilderByUser($userId) ; } @@ -133,7 +133,7 @@ class AnnotationRepository extends EntityRepository * * @return QueryBuilder */ - private function getBuilderByUser($userId) + private function getSortedQueryBuilderByUser($userId) { return $this->createQueryBuilder('a') ->leftJoin('a.user', 'u') -- cgit v1.2.3