Code Duplication    Length = 11-14 lines in 2 locations

src/QueryBuilder/QueryBuilder.php 2 locations

@@ 250-263 (lines=14) @@
247
     *                                model's ID, while null values are ignored.
248
     * @return self
249
     */
250
    public function is($number)
251
    {
252
        if ($number === null) {
253
            return $this;
254
        }
255
256
        if ($number instanceof Model) {
257
            $number = $number->getId();
258
        }
259
260
        $this->addColumnCondition("= ?", $number, 'i');
261
262
        return $this;
263
    }
264
265
    /**
266
     * Request that a column equals one of some strings
@@ 304-314 (lines=11) @@
301
     * @param  Model|int $model The ID or model you don't want to get
302
     * @return self
303
     */
304
    public function except($model)
305
    {
306
        if ($model instanceof Model) {
307
            $model = $model->getId();
308
        }
309
310
        $this->where('id');
311
        $this->addColumnCondition("!= ?", $model, 'i');
312
313
        return $this;
314
    }
315
316
    /**
317
     * Return the results sorted by the value of a column