Code Duplication    Length = 7-7 lines in 2 locations

src/Bardex/Elastic/Where.php 2 locations

@@ 40-46 (lines=7) @@
37
     * @example $query->where('channel')->in([1,2,3])->where('page.categoryId')->in([10,11]);
38
     * @return SearchQuery;
39
     */
40
    public function in(array $values)
41
    {
42
        // потому что ES не понимает дырки в ключах
43
        $values = array_values($values);
44
        $this->query->addFilter('terms', [$this->field => $values]);
45
        return $this->query;
46
    }
47
48
    /**
49
     * Добавить фильтр вхождения значение в диапазон (обе границы включительно).
@@ 170-176 (lines=7) @@
167
     * @example $query->where('channel')->notIn([1,2,3]);
168
     * @return SearchQuery;
169
     */
170
    public function notIn(array $values)
171
    {
172
        // потому что ES не понимает дырки в ключах
173
        $values = array_values($values);
174
        $this->query->addNotFilter('terms', [$this->field => $values]);
175
        return $this->query;
176
    }
177
178
179
    /**