ModelNotRateable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
1
<?php
2
3
namespace Canylmz\Rating\Exceptions;
4
5
use InvalidArgumentException;
6
use Canylmz\Rating\Contracts\Rateable;
7
8
class ModelNotRateable extends InvalidArgumentException
9
{
10
    public static function create(string $className)
11
    {
12
        return new static('The given model class `'.$className.'` does not implement `'.Rateable::class.'` contract');
13
    }
14
}
15