diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-07-03 13:39:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 13:39:54 +0200 |
commit | 71e1cbc8eb5928d393b0772055d6b711e90a09b3 (patch) | |
tree | 71795eadcf13fda9198b8cd9a3da26d51826bbd9 /src/Wallabag/AnnotationBundle/Repository | |
parent | 822c877949aff8ae57677671115f8f4fc69588d5 (diff) | |
parent | 38520658addc217f127b0627ea28dcf8d6e6178c (diff) | |
download | wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.gz wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.zst wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.zip |
Merge pull request #3258 from wallabag/cs-fixer
Add a real configuration for CS-Fixer
Diffstat (limited to 'src/Wallabag/AnnotationBundle/Repository')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index da361308..014c29b6 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | |||
@@ -10,22 +10,6 @@ use Doctrine\ORM\EntityRepository; | |||
10 | class AnnotationRepository extends EntityRepository | 10 | class AnnotationRepository extends EntityRepository |
11 | { | 11 | { |
12 | /** | 12 | /** |
13 | * Return a query builder to used by other getBuilderFor* method. | ||
14 | * | ||
15 | * @param int $userId | ||
16 | * | ||
17 | * @return QueryBuilder | ||
18 | */ | ||
19 | private function getBuilderByUser($userId) | ||
20 | { | ||
21 | return $this->createQueryBuilder('a') | ||
22 | ->leftJoin('a.user', 'u') | ||
23 | ->andWhere('u.id = :userId')->setParameter('userId', $userId) | ||
24 | ->orderBy('a.id', 'desc') | ||
25 | ; | ||
26 | } | ||
27 | |||
28 | /** | ||
29 | * Retrieves all annotations for a user. | 13 | * Retrieves all annotations for a user. |
30 | * | 14 | * |
31 | * @param int $userId | 15 | * @param int $userId |
@@ -139,4 +123,20 @@ class AnnotationRepository extends EntityRepository | |||
139 | ->getQuery() | 123 | ->getQuery() |
140 | ->getResult(); | 124 | ->getResult(); |
141 | } | 125 | } |
126 | |||
127 | /** | ||
128 | * Return a query builder to used by other getBuilderFor* method. | ||
129 | * | ||
130 | * @param int $userId | ||
131 | * | ||
132 | * @return QueryBuilder | ||
133 | */ | ||
134 | private function getBuilderByUser($userId) | ||
135 | { | ||
136 | return $this->createQueryBuilder('a') | ||
137 | ->leftJoin('a.user', 'u') | ||
138 | ->andWhere('u.id = :userId')->setParameter('userId', $userId) | ||
139 | ->orderBy('a.id', 'desc') | ||
140 | ; | ||
141 | } | ||
142 | } | 142 | } |