Passed
Push — main ( 2dd0b4...7b6409 )
by Fractal
03:40 queued 12s
created

EmptyMapper   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 6
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
A canMap() 0 3 1
A getPriority() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FRZB\Component\RequestMapper\Mapper;
6
7
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
8
9
#[AutoconfigureTag(MapperInterface::class)]
10
class EmptyMapper implements MapperInterface
11
{
12
    public function __invoke(string $typeName, mixed $value = null, array $parameters = []): mixed
13
    {
14
        return null;
15
    }
16
17
    public function canMap(string $typeName, mixed $value = null): bool
18
    {
19
        return true;
20
    }
21
22
    public static function getPriority(): int
23
    {
24
        return 0;
25
    }
26
}
27