diff --git a/src/Normalizer/Value/CacheableNormalization.php b/src/Normalizer/Value/CacheableNormalization.php index 7331a89..5384222 100644 --- a/src/Normalizer/Value/CacheableNormalization.php +++ b/src/Normalizer/Value/CacheableNormalization.php @@ -66,28 +66,6 @@ class CacheableNormalization implements CacheableDependencyInterface { return $this->normalization; } - /** - * Gets an altered CacheableNormalization. - * - * @param callable $mapper - * A function which receives a normalization and can add appropriate - * cacheability. The first argument will be the same as - * $this->getNormalization(). The second argument will be a - * CacheableMetadata object to which any additional cacheability must be - * added. The return value must be a valid return value for - * self::getNormalization(), but it is not required to be same as the input - * type. - * - * @return \Drupal\jsonapi\Normalizer\Value\CacheableNormalization - * A new object, using the mapped value and any additional cacheability - * provided by the callback function. - */ - public function map(callable $mapper) { - $additional_cacheability = new CacheableMetadata(); - $mapped = new static($this, $mapper($this->getNormalization(), $additional_cacheability)); - return $mapped->withCacheableDependency($additional_cacheability); - } - /** * Converts the object to a CacheableOmission if the normalization is empty. *