1: <?php
2:
3: declare(strict_types=1);
4:
5: /*
6: * This file has been auto generated by Jane,
7: *
8: * Do no edit it directly.
9: */
10:
11: namespace NxSys\Library\Clients\Brex\API\Payments\Runtime\Normalizer;
12:
13: use Jane\Component\JsonSchemaRuntime\Reference;
14: use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
15:
16: class ReferenceNormalizer implements NormalizerInterface
17: {
18: /**
19: * {@inheritdoc}
20: */
21: public function normalize($object, $format = null, array $context = [])
22: {
23: $ref = [];
24: $ref['$ref'] = (string) $object->getReferenceUri();
25:
26: return $ref;
27: }
28:
29: /**
30: * {@inheritdoc}
31: */
32: public function supportsNormalization($data, $format = null): bool
33: {
34: return $data instanceof Reference;
35: }
36: }
37: