Exceptions::columnNotSet()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace LarsJanssen\IncrementDecrement\Exceptions;
4
5
use Exception;
6
use Illuminate\Database\Eloquent\Model;
7
8
class Exceptions extends Exception
9
{
10
    /**
11
     * @param Model $model
12
     *
13
     * @return static
14
     */
15
    public static function columnNotFound(Model $model)
16
    {
17
        return new static("Could not find specified column on table `{$model->getTable()}`.");
18
    }
19
20
    /**
21
     * @return static
22
     */
23
    public static function columnNotSet()
24
    {
25
        return new static('Column not set in increment-decrement config file.');
26
    }
27
28
    /**
29
     * @return static
30
     */
31
    public static function numberUnValid($number)
32
    {
33
        return new static("Value `{$number}` is not a number.");
34
    }
35
36
    /**
37
     * @return static
38
     */
39
    public static function numberNotPositive($number)
40
    {
41
        return new static("Value `{$number}` must be positive.");
42
    }
43
}
44