diff --git a/core/modules/hal/src/Normalizer/CollectionNormalizer.php b/core/modules/hal/src/Normalizer/CollectionNormalizer.php index c66cc64..025d9aa 100644 --- a/core/modules/hal/src/Normalizer/CollectionNormalizer.php +++ b/core/modules/hal/src/Normalizer/CollectionNormalizer.php @@ -1,10 +1,5 @@ [ @@ -52,12 +48,6 @@ public function normalize($object, $format = NULL, array $context = []) { ], ]; - // $object is not type-hinted, so we cannot be sure this method will not be - // called on a non-Collection object, and there is no interface to check on. - if (!$object instanceof Collection) { - return $normalized; - } - // If we have additional hypermedia links add them here. $links = $object->getLinks(); if (is_array($links) && count($links)) { diff --git a/core/modules/hal/tests/src/Unit/CollectionNormalizerTest.php b/core/modules/hal/tests/src/Unit/CollectionNormalizerTest.php index 7953815..30c6031 100644 --- a/core/modules/hal/tests/src/Unit/CollectionNormalizerTest.php +++ b/core/modules/hal/tests/src/Unit/CollectionNormalizerTest.php @@ -1,8 +1,4 @@