StringValue   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A inProperty() 0 3 1
A inPropertyWithDifferentKey() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Stratadox\Hydration\Mapping\Simple\Type;
5
6
use Stratadox\Hydration\Mapping\Transform\KeyTransform;
7
use Stratadox\Hydration\Mapping\Simple\Keyed;
0 ignored issues
show
Bug introduced by
The type Stratadox\Hydration\Mapping\Simple\Keyed was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Stratadox\Hydration\Mapping\Primitive\StringMapping;
9
use Stratadox\HydrationMapping\KeyedMapping;
10
use Stratadox\HydrationMapping\Mapping;
11
12
final class StringValue
13
{
14
    public static function inProperty(string $name): Mapping
15
    {
16
        return StringMapping::inProperty($name);
17
    }
18
19
    public static function inPropertyWithDifferentKey(
20
        string $name,
21
        string $key
22
    ): Mapping {
23
        return KeyTransform::use($key, StringMapping::inProperty($name));
24
    }
25
}
26