Passed
Push — feature/VSVGVQ-7 ( 28bb1c...21bc21 )
by Luc
03:27
created

QuestionSerializer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
1
<?php declare(strict_types=1);
2
3
namespace VSV\GVQ_API\Question\Serializers;
4
5
use Symfony\Component\Serializer\Encoder\JsonEncoder;
6
use Symfony\Component\Serializer\Serializer;
7
8
class QuestionSerializer extends Serializer
9
{
10
    public function __construct()
11
    {
12
        $normalizers = [
13
            new QuestionNormalizer(
14
                new CategoryNormalizer(),
15
                new AnswerNormalizer()
16
            ),
17
            new QuestionDenormalizer(
18
                new CategoryDenormalizer(),
19
                new AnswerDenormalizer()
20
            ),
21
        ];
22
        $encoders = [
23
            new JsonEncoder(),
24
        ];
25
26
        parent::__construct($normalizers, $encoders);
27
    }
28
}
29