@@ -12,7 +12,6 @@ |
||
12 | 12 | * @author Denis Voytyuk <[email protected]> |
13 | 13 | * |
14 | 14 | * @package Artprima\QueryFilterBundle\Controller\Annotations |
15 | - |
|
16 | 15 | * @Annotation |
17 | 16 | */ |
18 | 17 | class QueryFilter extends Template |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | if (!$result instanceof EntityManager) { |
44 | - throw new InvalidArgumentException(self::class. ': expected EntityManager instance. Wrong configuration?'); |
|
44 | + throw new InvalidArgumentException(self::class.': expected EntityManager instance. Wrong configuration?'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $result; |
@@ -66,18 +66,18 @@ discard block |
||
66 | 66 | $options = $this->getOptions($configuration); |
67 | 67 | |
68 | 68 | if (!isset($options['entity_class'])) { |
69 | - throw new InvalidArgumentException(self::class. ': entity_class not provided. Wrong configuration?'); |
|
69 | + throw new InvalidArgumentException(self::class.': entity_class not provided. Wrong configuration?'); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | if (!isset($options['repository_method'])) { |
73 | - throw new InvalidArgumentException(self::class. ': repository_method not provided. Wrong configuration?'); |
|
73 | + throw new InvalidArgumentException(self::class.': repository_method not provided. Wrong configuration?'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $configClassName = $configuration->getClass(); |
77 | 77 | $config = new $configClassName(); |
78 | 78 | |
79 | 79 | if (!$config instanceof ConfigInterface) { |
80 | - throw new InvalidArgumentException(self::class. ': config is not QueryFilterConfig descendant. Wrong configuration?'); |
|
80 | + throw new InvalidArgumentException(self::class.': config is not QueryFilterConfig descendant. Wrong configuration?'); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | $config->setRequest(new Request($request)); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $repo = $manager->getRepository($options['entity_class']); |
87 | 87 | |
88 | 88 | if (!is_callable(array($repo, $options['repository_method']))) { |
89 | - throw new InvalidArgumentException(self::class. ': repository_method is not callable. Wrong configuration?'); |
|
89 | + throw new InvalidArgumentException(self::class.': repository_method is not callable. Wrong configuration?'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | $config->setRepositoryCallback(array($repo, $options['repository_method'])); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | * |
111 | 111 | * @return callable |
112 | 112 | */ |
113 | - public function getRepositoryCallback(): callable ; |
|
113 | + public function getRepositoryCallback(): callable; |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * @param array $allowedLimits allowed pagination limits (eg. [5, 10, 25, 50, 100]) |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | public function getExpr(QueryBuilder $qb, string $field, int $index, array $val) |
17 | 17 | { |
18 | - $expr = $qb->expr()->lt($field, '?' . $index); |
|
18 | + $expr = $qb->expr()->lt($field, '?'.$index); |
|
19 | 19 | $qb->setParameter($index, $val['val'] ?? ''); |
20 | 20 | |
21 | 21 | return $expr; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | public function getExpr(QueryBuilder $qb, string $field, int $index, array $val) |
17 | 17 | { |
18 | - $expr = $qb->expr()->gte($field, '?' . $index); |
|
18 | + $expr = $qb->expr()->gte($field, '?'.$index); |
|
19 | 19 | $qb->setParameter($index, $val['val'] ?? ''); |
20 | 20 | |
21 | 21 | return $expr; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | public function getExpr(QueryBuilder $qb, string $field, int $index, array $val) |
17 | 17 | { |
18 | - $expr = $qb->expr()->gt($field, '?' . $index); |
|
18 | + $expr = $qb->expr()->gt($field, '?'.$index); |
|
19 | 19 | $qb->setParameter($index, $val['val'] ?? ''); |
20 | 20 | |
21 | 21 | return $expr; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $values = explode(',', $val['val'] ?? ''); |
19 | 19 | $values = array_map('trim', $values); |
20 | - $expr = $qb->expr()->notIn($field, '?' . $index); |
|
20 | + $expr = $qb->expr()->notIn($field, '?'.$index); |
|
21 | 21 | $qb->setParameter($index, $values); |
22 | 22 | |
23 | 23 | return $expr; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | public function getExpr(QueryBuilder $qb, string $field, int $index, array $val) |
17 | 17 | { |
18 | - $expr = $qb->expr()->not($qb->expr()->eq($field, '?' . $index)); |
|
18 | + $expr = $qb->expr()->not($qb->expr()->eq($field, '?'.$index)); |
|
19 | 19 | $qb->setParameter($index, $val['val'] ?? ''); |
20 | 20 | |
21 | 21 | return $expr; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | public function getExpr(QueryBuilder $qb, string $field, int $index, array $val) |
18 | 18 | { |
19 | - $expr = new DoctrineQuery\Expr\Comparison('?' . $index, 'MEMBER OF', $field); |
|
19 | + $expr = new DoctrineQuery\Expr\Comparison('?'.$index, 'MEMBER OF', $field); |
|
20 | 20 | $qb->setParameter($index, $val['val'] ?? ''); |
21 | 21 | |
22 | 22 | return $expr; |