Test Failed
Push — main ( 450f80...a11e57 )
by Fractal
02:32
created

DefaultPropertyMapper::canMap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FRZB\Component\RequestMapper\PropertyMapper\Mapper;
6
7
use FRZB\Component\DependencyInjection\Attribute\AsService;
8
use FRZB\Component\DependencyInjection\Attribute\AsTagged;
9
use FRZB\Component\RequestMapper\Helper\PropertyHelper;
10
11
#[AsService, AsTagged(PropertyMapperInterface::class, priority: 0)]
12
final class DefaultPropertyMapper implements PropertyMapperInterface
13
{
14
    public function map(\ReflectionProperty $property, mixed $value): array
15
    {
16
        return [PropertyHelper::getName($property) => []];
17
    }
18
19
    public function canMap(\ReflectionProperty $property): bool
20
    {
21
        return true;
22
    }
23
}
24