Completed
Push — master ( 14cfed...b26125 )
by Freek
02:44 queued 35s
created

InvalidConfiguration::hostModelIsNotValid()   A

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 1
1
<?php
2
3
namespace Spatie\ServerMonitor\Exceptions;
4
5
use Exception;
6
use Spatie\ServerMonitor\Models\Host;
7
use Spatie\ServerMonitor\Models\Check;
8
9
class InvalidConfiguration extends Exception
10
{
11
    public static function checkModelIsNotValid(string $className)
12
    {
13
        return new static("The given model class `{$className}` does not extend `".Check::class.'`');
14
    }
15
16
    public static function hostModelIsNotValid(string $className)
17
    {
18
        return new static("The given model class `{$className}` does not extend `".Host::class.'`');
19
    }
20
}
21