Passed
Push — master ( 9187bd...555ece )
by steven
03:07
created

QuestionsSerializer::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
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 QuestionsSerializer extends Serializer
9
{
10
    public function __construct()
11
    {
12
        $normalizers = [
13
            new QuestionsNormalizer(
14
                new QuestionNormalizer(
15
                    new CategoryNormalizer(),
16
                    new AnswerNormalizer()
17
                )
18
            ),
19
        ];
20
        $encoders = [
21
            new JsonEncoder(),
22
        ];
23
24
        parent::__construct($normalizers, $encoders);
25
    }
26
}
27