Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class TagSerializer |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var TagRepository $tagRepository |
||
15 | */ |
||
16 | private $tagRepository; |
||
17 | |||
18 | public function trickTagsJson(Trick $trick) |
||
19 | { |
||
20 | $serializer = new Serializer([new ObjectNormalizer()]); |
||
21 | |||
22 | return json_encode($serializer->normalize($trick->getTags(), null, ['attributes' => ['name']])); |
||
23 | } |
||
24 | |||
25 | public function allTagsJson() |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @required |
||
34 | * @param TagRepository $tagRepository |
||
35 | */ |
||
36 | public function setTagRepository(TagRepository $tagRepository): void |
||
39 | } |
||
40 | |||
42 | } |