Passed
Push — master ( 01c6a8...5a4258 )
by Jesse
09:00
created

NoRelationObservationMade::forIn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Stratadox\Hydration\Mapping\Relation;
5
6
use RuntimeException;
7
use Stratadox\HydrationMapping\MappingFailure;
8
use function sprintf;
9
10
final class NoRelationObservationMade extends RuntimeException implements MappingFailure
11
{
12
    public static function forIn(string $property): MappingFailure
13
    {
14
        return new self(sprintf(
15
            'Failed to map the `%s` relationship: no relation target observed.',
16
            $property
17
        ));
18
    }
19
}
20