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

MappingException   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
class MappingException extends StorageException
6
{
7
    public static function forUnknownMappingStrategy(string $type): MappingException
8
    {
9
        return new self("Unknown mapping strategy - `${type}`. Did you forgot to call Strategy::register()?");
10
    }
11
12
    public static function forNonRegisteredSchema(string $entity): MappingException
13
    {
14
        return new self("Entity `${entity}` has no schema assigned.");
15
    }
16
}
17