Loading core/modules/hal/src/Normalizer/ContentEntityNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ public function __construct(LinkManagerInterface $link_manager, EntityTypeManage /** * {@inheritdoc} */ public function normalize($entity, $format = NULL, array $context = []) { public function normalize($entity, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { $context += [ 'account' => NULL, 'included_fields' => NULL, Loading core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public function __construct(LinkManagerInterface $link_manager, EntityResolverIn /** * {@inheritdoc} */ public function normalize($field_item, $format = NULL, array $context = []) { public function normalize($field_item, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { // If this is not a fieldable entity, let the parent implementation handle // it, only fieldable entities are supported as embedded resources. if (!$this->targetEntityIsFieldable($field_item)) { Loading core/modules/hal/src/Normalizer/FieldItemNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class FieldItemNormalizer extends NormalizerBase { /** * {@inheritdoc} */ public function normalize($field_item, $format = NULL, array $context = []) { public function normalize($field_item, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { // The values are wrapped in an array, and then wrapped in another array // keyed by field name so that field items can be merged by the // FieldNormalizer. This is necessary for the EntityReferenceItemNormalizer Loading core/modules/hal/src/Normalizer/FieldNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class FieldNormalizer extends SerializationFieldNormalizer { /** * {@inheritdoc} */ public function normalize($field_items, $format = NULL, array $context = []) { public function normalize($field_items, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { $normalized_field_items = []; // Get the field definition. Loading core/modules/jsonapi/src/Normalizer/DataNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class DataNormalizer extends NormalizerBase { /** * {@inheritdoc} */ public function normalize($object, $format = NULL, array $context = []) { public function normalize($object, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { assert($object instanceof Data); $cacheable_normalizations = array_map(function ($resource) use ($format, $context) { return $this->serializer->normalize($resource, $format, $context); Loading Loading
core/modules/hal/src/Normalizer/ContentEntityNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ public function __construct(LinkManagerInterface $link_manager, EntityTypeManage /** * {@inheritdoc} */ public function normalize($entity, $format = NULL, array $context = []) { public function normalize($entity, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { $context += [ 'account' => NULL, 'included_fields' => NULL, Loading
core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public function __construct(LinkManagerInterface $link_manager, EntityResolverIn /** * {@inheritdoc} */ public function normalize($field_item, $format = NULL, array $context = []) { public function normalize($field_item, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { // If this is not a fieldable entity, let the parent implementation handle // it, only fieldable entities are supported as embedded resources. if (!$this->targetEntityIsFieldable($field_item)) { Loading
core/modules/hal/src/Normalizer/FieldItemNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class FieldItemNormalizer extends NormalizerBase { /** * {@inheritdoc} */ public function normalize($field_item, $format = NULL, array $context = []) { public function normalize($field_item, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { // The values are wrapped in an array, and then wrapped in another array // keyed by field name so that field items can be merged by the // FieldNormalizer. This is necessary for the EntityReferenceItemNormalizer Loading
core/modules/hal/src/Normalizer/FieldNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class FieldNormalizer extends SerializationFieldNormalizer { /** * {@inheritdoc} */ public function normalize($field_items, $format = NULL, array $context = []) { public function normalize($field_items, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { $normalized_field_items = []; // Get the field definition. Loading
core/modules/jsonapi/src/Normalizer/DataNormalizer.php +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class DataNormalizer extends NormalizerBase { /** * {@inheritdoc} */ public function normalize($object, $format = NULL, array $context = []) { public function normalize($object, $format = NULL, array $context = []): array|string|int|float|bool|\ArrayObject|NULL { assert($object instanceof Data); $cacheable_normalizations = array_map(function ($resource) use ($format, $context) { return $this->serializer->normalize($resource, $format, $context); Loading