Passed
Pull Request — master (#53)
by Alexander
23:13 queued 06:44
created

SchemaNotReadException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 4
c 1
b 0
f 1
dl 0
loc 13
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 3 1
A getSolution() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Cycle\Exception;
6
7
use RuntimeException;
8
use Yiisoft\FriendlyException\FriendlyExceptionInterface;
9
10
class SchemaNotReadException extends RuntimeException implements FriendlyExceptionInterface
11
{
12
    public function __construct()
13
    {
14
        parent::__construct('Cycle Schema not read.');
15
    }
16
    public function getName(): string
17
    {
18
        return 'Current Schema for Cycle ORM has not been read';
19
    }
20
    public function getSolution(): ?string
21
    {
22
        return 'If you are using the SchemaManager to get the Schema, make sure it is configured correctly.';
23
    }
24
}
25