Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class ScanResultNormalizer implements NormalizerInterface |
||
24 | { |
||
25 | /** |
||
26 | * Converts an object into a set of arrays/scalars |
||
27 | * |
||
28 | * @var NormalizerInterface |
||
29 | */ |
||
30 | private $normalizer; |
||
31 | |||
32 | /** |
||
33 | * RawDataPreviewNormalizer constructor. |
||
34 | * |
||
35 | * @param NormalizerInterface $normalizer Converts an object into a set of arrays/scalars |
||
36 | */ |
||
37 | public function __construct(NormalizerInterface $normalizer) |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function normalize($object, $format = null, array $context = []) |
||
46 | { |
||
47 | $normalizedData = $this->normalizer->normalize($object, $format, $context); |
||
48 | |||
49 | $normalizedData['vacancy']['snippet'] = '...'; |
||
50 | $normalizedData['vacancy']['text'] = '...'; |
||
51 | |||
52 | return $normalizedData; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function supportsNormalization($data, $format = null) |
||
61 | } |
||
62 | } |
||
63 |