Code Duplication    Length = 12-12 lines in 2 locations

src/Query/QueryBuilder.php 2 locations

@@ 371-382 (lines=12) @@
368
    /**
369
     * {@inheritdoc}
370
     */
371
    public function increment($column, $amount = 1, array $extra = [])
372
    {
373
        if (!is_numeric($amount)) {
374
            throw new \InvalidArgumentException('Non-numeric value passed to increment method.');
375
        }
376
377
        $wrapped = $this->prepareColumn($column);
378
379
        $columns = array_merge([$column => $this->raw("$wrapped + $amount")], $extra);
380
381
        return $this->update($columns);
382
    }
383
384
    /**
385
     * {@inheritdoc}
@@ 387-398 (lines=12) @@
384
    /**
385
     * {@inheritdoc}
386
     */
387
    public function decrement($column, $amount = 1, array $extra = [])
388
    {
389
        if (!is_numeric($amount)) {
390
            throw new \InvalidArgumentException('Non-numeric value passed to decrement method.');
391
        }
392
393
        $wrapped = $this->prepareColumn($column);
394
395
        $columns = array_merge([$column => $this->raw("$wrapped - $amount")], $extra);
396
397
        return $this->update($columns);
398
    }
399
400
    /**
401
     * {@inheritdoc}