Passed
Pull Request — master (#4)
by
unknown
01:33
created

BadGeneratorDeclarationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 10
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getSolution() 0 6 1
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