| Total Complexity | 3 | 
| Total Lines | 20 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1);  | 
            ||
| 8 | class CategoryNormalizer implements NormalizerInterface  | 
            ||
| 9 | { | 
            ||
| 10 | /**  | 
            ||
| 11 | * @inheritdoc  | 
            ||
| 12 | */  | 
            ||
| 13 | public function normalize($category, $format = null, array $context = []): array  | 
            ||
| 14 |     { | 
            ||
| 15 | /** @var Category $category */  | 
            ||
| 16 | return [  | 
            ||
| 17 | 'id' => $category->getId()->toString(),  | 
            ||
| 18 | 'name' => $category->getName()->toNative(),  | 
            ||
| 19 | ];  | 
            ||
| 20 | }  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @inheritdoc  | 
            ||
| 24 | */  | 
            ||
| 25 | public function supportsNormalization($data, $format = null): bool  | 
            ||
| 28 | }  | 
            ||
| 29 | }  | 
            ||
| 30 |