Test Failed
Pull Request — stable (#68)
by Nuno
18:22
created

ClassNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSolution() 0 5 1
1
<?php
2
3
use Facade\IgnitionContracts\BaseSolution;
4
use Facade\IgnitionContracts\ProvidesSolution;
5
use Facade\IgnitionContracts\Solution;
6
7
require __DIR__ . '/../vendor/autoload.php';
8
9
(new \NunoMaduro\Collision\Provider)->register();
10
11
class ClassNotFoundException extends Exception implements ProvidesSolution
12
{
13
    public function getSolution(): Solution
14
    {
15
        return BaseSolution::create('A class import is missing')
16
            ->setSolutionDescription('You have a missing class import. Try importing this class: App\Post.');
17
    }
18
}
19
20
throw new ClassNotFoundException("Class `Post` not found.");
21