Passed
Push — main ( 03d0aa...06b87c )
by Stanislav
02:17
created

DefaultValueResolver::getResolver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Diezz\YamlToObjectMapper\Attributes;
4
5
use Attribute;
6
7
#[Attribute(Attribute::TARGET_PROPERTY)]
8
class DefaultValueResolver
9
{
10
    public const PARENT_KEY = 'parent.key';
11
    public const NESTED_LIST = 'nested.list';
12
13
    private string $resolver;
14
15 1
    public function __construct(string $resolver = self::PARENT_KEY)
16
    {
17 1
        $this->resolver = $resolver;
18 1
    }
19
20
    /**
21
     * @return string
22
     */
23 1
    public function getResolver(): string
24
    {
25 1
        return $this->resolver;
26
    }
27
}
28