Completed
Push — master ( 9af059...286024 )
by Luc
12s
created

CompanySerializer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
1
<?php declare(strict_types=1);
2
3
namespace VSV\GVQ_API\Company\Serializers;
4
5
use Symfony\Component\Serializer\Encoder\JsonEncoder;
6
use Symfony\Component\Serializer\Serializer;
7
use VSV\GVQ_API\User\Serializers\UserDenormalizer;
8
use VSV\GVQ_API\User\Serializers\UserNormalizer;
9
10
class CompanySerializer extends Serializer
11
{
12
    public function __construct()
13
    {
14
        $normalizers = [
15
            new CompanyNormalizer(
16
                new TranslatedAliasNormalizer(),
17
                new UserNormalizer()
18
            ),
19
            new CompanyDenormalizer(
20
                new TranslatedAliasDenormalizer(),
21
                new UserDenormalizer()
22
            ),
23
        ];
24
        $encoders = [
25
            new JsonEncoder(),
26
        ];
27
28
        parent::__construct($normalizers, $encoders);
29
    }
30
}
31