@@ -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]) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $expr = $qb->expr()->eq($field, '?'.$i); |
48 | 48 | $qb->setParameter($i, $value); |
49 | 49 | } elseif ($condition === 'not eq') { |
50 | - $expr = $qb->expr()->not($qb->expr()->eq($field, '?' . $i)); |
|
50 | + $expr = $qb->expr()->not($qb->expr()->eq($field, '?'.$i)); |
|
51 | 51 | $qb->setParameter($i, $value); |
52 | 52 | } elseif ($condition === 'like') { |
53 | 53 | $expr = $qb->expr()->like($field, '?'.$i); |
@@ -71,26 +71,26 @@ discard block |
||
71 | 71 | } elseif ($condition === 'not in') { |
72 | 72 | $values = explode(',', $value); |
73 | 73 | $values = array_map('trim', $values); |
74 | - $expr = $qb->expr()->notIn($field, '?' . $i); |
|
74 | + $expr = $qb->expr()->notIn($field, '?'.$i); |
|
75 | 75 | $qb->setParameter($i, $values); |
76 | 76 | } elseif ($condition === 'is null') { |
77 | 77 | $expr = $qb->expr()->isNull($field); |
78 | 78 | } elseif ($condition === 'is not null') { |
79 | 79 | $expr = $qb->expr()->isNotNull($field); |
80 | 80 | } elseif ($condition === 'member of') { |
81 | - $expr = new DoctrineQuery\Expr\Comparison('?' . $i, 'MEMBER OF', $field); |
|
81 | + $expr = new DoctrineQuery\Expr\Comparison('?'.$i, 'MEMBER OF', $field); |
|
82 | 82 | $qb->setParameter($i, $value); |
83 | 83 | } elseif ($condition === 'gte') { |
84 | - $expr = $qb->expr()->gte($field, '?' . $i); |
|
84 | + $expr = $qb->expr()->gte($field, '?'.$i); |
|
85 | 85 | $qb->setParameter($i, $value); |
86 | 86 | } elseif ($condition === 'gt') { |
87 | - $expr = $qb->expr()->gt($field, '?' . $i); |
|
87 | + $expr = $qb->expr()->gt($field, '?'.$i); |
|
88 | 88 | $qb->setParameter($i, $value); |
89 | 89 | } elseif ($condition === 'lte') { |
90 | - $expr = $qb->expr()->lte($field, '?' . $i); |
|
90 | + $expr = $qb->expr()->lte($field, '?'.$i); |
|
91 | 91 | $qb->setParameter($i, $value); |
92 | 92 | } elseif ($condition === 'lt') { |
93 | - $expr = $qb->expr()->lt($field, '?' . $i); |
|
93 | + $expr = $qb->expr()->lt($field, '?'.$i); |
|
94 | 94 | $qb->setParameter($i, $value); |
95 | 95 | } else { |
96 | 96 | // it can be possible in future to extend to further expressions if needed, otherwise throw exception |