Code Duplication    Length = 11-14 lines in 2 locations

src/QueryBuilder/QueryBuilder.php 2 locations

@@ 339-352 (lines=14) @@
336
     *                                model's ID, while null values are ignored.
337
     * @return static
338
     */
339
    public function is($number)
340
    {
341
        if ($number === null) {
342
            return $this;
343
        }
344
345
        if ($number instanceof Model) {
346
            $number = $number->getId();
347
        }
348
349
        $this->addColumnCondition("= ?", $number);
350
351
        return $this;
352
    }
353
354
    /**
355
     * Request that a column equals one of some strings
@@ 393-403 (lines=11) @@
390
     * @param  Model|int $model The ID or model you don't want to get
391
     * @return static
392
     */
393
    public function except($model)
394
    {
395
        if ($model instanceof Model) {
396
            $model = $model->getId();
397
        }
398
399
        $this->where('id');
400
        $this->addColumnCondition("!= ?", $model);
401
402
        return $this;
403
    }
404
405
    /**
406
     * Return the results sorted by the value of a column