@@ 166-173 (lines=8) @@ | ||
163 | protected function buildQueryForAnd($queryBuilder, $key, $value) |
|
164 | { |
|
165 | $sqlOptions = self::buildFilter([$key => $value]); |
|
166 | if (in_array($sqlOptions['method'], ['in', 'notIn'], true)) { |
|
167 | $queryBuilder->andWhere( |
|
168 | $queryBuilder->expr()->{$sqlOptions['method']}( |
|
169 | $this->collection . '.' . $sqlOptions['key'], $sqlOptions['value'] |
|
170 | ) |
|
171 | ); |
|
172 | return $queryBuilder; |
|
173 | } |
|
174 | $queryBuilder->andWhere( |
|
175 | '' . $this->collection . '.' . $sqlOptions['key'].'' |
|
176 | . ' ' . $sqlOptions['operand'] |
|
@@ 188-193 (lines=6) @@ | ||
185 | $subKey = array_keys($orValue)[0]; |
|
186 | $subValue = $orValue[$subKey]; |
|
187 | $sqlOptions = self::buildFilter([$subKey => $subValue]); |
|
188 | if (in_array($sqlOptions['method'], ['in', 'notIn'], true)) { |
|
189 | $orQuery[] = $queryBuilder->expr()->{$sqlOptions['method']}( |
|
190 | $this->collection . '.' . $sqlOptions['key'], $sqlOptions['value'] |
|
191 | ); |
|
192 | continue; |
|
193 | } |
|
194 | $orQuery[] = |
|
195 | '' . $this->collection . '.' . $sqlOptions['key'].'' |
|
196 | . ' ' . $sqlOptions['operand'] |