Passed
Push — master ( 4ae095...46ef9e )
by Alexander
02:10 queued 13s
created

BadGeneratorDeclarationException::getName()   A

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Yiisoft\Yii\Cycle\Exception;
4
5
use Exception;
6
use Yiisoft\FriendlyException\FriendlyExceptionInterface;
7
8
class BadGeneratorDeclarationException extends Exception implements FriendlyExceptionInterface
9
{
10
    public function getName(): string
11
    {
12
        return 'Bad declaration of schema generator';
13
    }
14
    public function getSolution(): ?string
15
    {
16
        return "When you add a generator for the Schema Conveyor you should specify a value that can be:\n\n"
17
            . "- Name of the class implementing GeneratorInterface\n"
18
            . "- An object implementing GeneratorInterface\n"
19
            . "- A function that returns an object implementing GeneratorInterface";
20
    }
21
}
22