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

MappingException::forUnknownMappingStrategy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
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