NoRelationObservationMade   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A forIn() 0 5 1
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