Code Duplication    Length = 11-11 lines in 2 locations

src/Expression.php 2 locations

@@ 28-38 (lines=11) @@
25
     *
26
     * @return $this|Expression
27
     */
28
    public function and($expression): Expression
29
    {
30
        $this->prepareFilterIndex('$and');
31
32
        $this->filters['$and'] = array_merge(
33
            $this->filters['$and'],
34
            $this->mapExpressions(...func_get_args())
35
        );
36
37
        return $this;
38
    }
39
40
    /**
41
     * @param string $operator
@@ 82-92 (lines=11) @@
79
     *
80
     * @return $this|Expression
81
     */
82
    public function or ($expression): Expression
83
    {
84
        $this->prepareFilterIndex('$or');
85
86
        $this->filters['$or'] = array_merge(
87
            $this->filters['$or'],
88
            $this->mapExpressions(...func_get_args())
89
        );
90
91
        return $this;
92
    }
93
94
    /**
95
     * Adds eq filter