Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | private static function model(?string $model): string |
||
36 | { |
||
37 | if ($model) { |
||
38 | if (self::modelExists($model)) { |
||
39 | return $model; |
||
|
|||
40 | } |
||
41 | |||
42 | // @codeCoverageIgnoreStart |
||
43 | $defaultPath = "App\\Models\\$model"; |
||
44 | |||
45 | if (self::modelExists($defaultPath)) { |
||
46 | return $defaultPath; |
||
47 | } |
||
48 | // @codeCoverageIgnoreEnd |
||
49 | } |
||
50 | |||
51 | throw ModelDoestNotExist::make($model); |
||
52 | } |
||
67 |