Test Failed
Push — master ( 8a2b60...8e4848 )
by Dominik
03:00
created

Normalizer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 29
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A normalize() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Serialization\Normalizer;
6
7
use Psr\Log\LoggerInterface;
8
use Psr\Log\NullLogger;
9
10
final class Normalizer implements NormalizerInterface
11
{
12
    /**
13
     * @var NormalizerObjectMappingRegistryInterface
14
     */
15
    private $normalizerObjectMappingRegistry;
16
17
    /**
18
     * @var LoggerInterface
19
     */
20
    private $logger;
21
22
    /**
23
     * @param NormalizerObjectMappingRegistryInterface $normalizerObjectMappingRegistry
24
     * @param LoggerInterface|null                     $logger
25
     */
26
    public function __construct(
27
        NormalizerObjectMappingRegistryInterface $normalizerObjectMappingRegistry,
28
        LoggerInterface $logger = null
29
    ) {
30
        $this->normalizerObjectMappingRegistry = $normalizerObjectMappingRegistry;
31
        $this->logger = $logger ?? new NullLogger();
32
    }
33
34
    public function normalize($object, NormalizerContextInterface $context = null, string $path = ''): array
35
    {
36
        return [];
37
    }
38
}
39