Test Failed
Push — master ( 34c614...ede9b5 )
by Dawid
05:49
created

StorageException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Igni\Storage\Exception;
4
5
use RuntimeException;
6
7
class StorageException extends RuntimeException
8
{
9
    public static function forNotRegisteredRepository(string $class): self
10
    {
11
        return new self("Entity class ${class} has no repository assigned to it, have you forgot to call Ink::register()?");
12
    }
13
14
    public static function forNotRegisteredConnection(string $name): self
15
    {
16
        return new self("Connection with name ${name} was not registered.");
17
    }
18
}
19