GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 15-17 lines in 2 locations

src/Operator.php 2 locations

@@ 130-144 (lines=15) @@
127
     * @return \Sokil\Mongo\Operator
128
     * @throws \Sokil\Mongo\Exception
129
     */
130
    public function pushEachSort($field, array $sort)
131
    {
132
        // add modifiers
133
        if (empty($sort)) {
134
            throw new Exception('Sort condition is empty');
135
        }
136
        
137
        if (!isset($this->operators['$push'][$field]['$each'])) {
138
            throw new Exception('Field ' . $field . ' must be pushed with $each modifier');
139
        }
140
        
141
        $this->operators['$push'][$field]['$sort'] = $sort;
142
        
143
        return $this;
144
    }
145
146
    /**
147
     * The $position modifier specifies the location in the array at which
@@ 158-174 (lines=17) @@
155
     * @return \Sokil\Mongo\Operator
156
     * @throws \Sokil\Mongo\Exception
157
     */
158
    public function pushEachPosition($field, $position)
159
    {
160
        $position = (int) $position;
161
        
162
        // add modifiers
163
        if ($position <= 0) {
164
            throw new Exception('Position must be greater 0');
165
        }
166
        
167
        if (!isset($this->operators['$push'][$field]['$each'])) {
168
            throw new Exception('Field ' . $field . ' must be pushed with $each modifier');
169
        }
170
        
171
        $this->operators['$push'][$field]['$position'] = $position;
172
        
173
        return $this;
174
    }
175
176
    public function addToSet($field, $value)
177
    {