Passed
Push — master ( 924412...d4b74b )
by Jesse
02:02
created

HasOneNested::inPropertyWithDifferentKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Stratadox\Hydration\Mapping\Simple\Relationship;
5
6
use Stratadox\Deserializer\Deserializer;
7
use Stratadox\Hydration\Mapping\Nested;
8
use Stratadox\Hydration\Mapping\Relation\RelationMapping;
9
use Stratadox\HydrationMapping\Mapping;
10
11
final class HasOneNested
12
{
13
    public static function inProperty(
14
        string $name,
15
        Deserializer $deserializer
16
    ): Mapping {
17
        return Nested::inKey($name, RelationMapping::inProperty($name, $deserializer));
18
    }
19
20
    public static function inPropertyWithDifferentKey(
21
        string $name,
22
        string $key,
23
        Deserializer $deserializer
24
    ): Mapping {
25
        return Nested::inKey($key, RelationMapping::inProperty($name, $deserializer));
26
    }
27
}
28