GeneratorNotFoundException::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
c 1
b 0
f 0
cc 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Gii\Exception;
6
7
use Exception;
8
use Yiisoft\FriendlyException\FriendlyExceptionInterface;
9
10
class GeneratorNotFoundException extends Exception implements FriendlyExceptionInterface
11
{
12
    public function getName(): string
13
    {
14
        return 'Generator not found';
15
    }
16
17
    public function getSolution(): ?string
18
    {
19
        return "When you add a generator for the Gii Generator you should specify a value that can be:\n\n"
20
            . "- Name of the class implementing GeneratorInterface.\n"
21
            . "- An object implementing GeneratorInterface.\n"
22
            . '- A function that returns an object implementing GeneratorInterface.';
23
    }
24
}
25