Completed
Push — master ( cd03ce...a0b884 )
by Jesse
02:19
created

NoReferrerFound   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A tryingToHydrateBackReferenceIn() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stratadox\Hydration\Mapping\Property\Relationship;
6
7
use RuntimeException;
8
use function sprintf;
9
use Stratadox\Hydration\UnmappableInput;
10
11
final class NoReferrerFound extends RuntimeException implements UnmappableInput
12
{
13
    public static function tryingToHydrateBackReferenceIn(string $property) : self
14
    {
15
        return new self(sprintf(
16
            'Failed to reference back to the `%s` relationship: no referrer found.',
17
            $property
18
        ));
19
    }
20
}
21