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

ScalarArgumentResolver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A doResolve() 0 3 1
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Diezz\YamlToObjectMapper\Resolver;
4
5
class ScalarArgumentResolver extends CustomArgumentResolver
6
{
7
    private mixed $scalar;
8
9
    /**
10
     * @param mixed $scalar
11
     */
12 2
    public function __construct(mixed $scalar)
13
    {
14 2
        $this->scalar = $scalar;
15 2
    }
16
17 2
    protected function doResolve($context = null)
18
    {
19 2
        return $this->scalar;
20
    }
21
}
22