src/JsonApiResource/EntityCollection.php | 4 ++-- src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/JsonApiResource/EntityCollection.php b/src/JsonApiResource/EntityCollection.php index 8a3d8a8..b28de7d 100644 --- a/src/JsonApiResource/EntityCollection.php +++ b/src/JsonApiResource/EntityCollection.php @@ -50,8 +50,8 @@ class EntityCollection implements \IteratorAggregate, \Countable { * @param int $cardinality * The number of resources that this collection may contain. Related * resource collections may handle both to-one or to-many relationships. A - * to-one relationship should have a cardinality of 1. Use -1 is for - * unlimited cardinality. + * to-one relationship should have a cardinality of 1. Use -1 for unlimited + * cardinality. */ public function __construct(array $resources, $cardinality = -1) { assert(Inspector::assertAll(function ($entity) { diff --git a/src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php b/src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php index 7712db0..9b3eb8a 100644 --- a/src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php +++ b/src/Normalizer/Value/JsonApiDocumentTopLevelNormalizerValue.php @@ -152,7 +152,6 @@ class JsonApiDocumentTopLevelNormalizerValue implements ValueExtractorInterface, $rasterized['links'] += [ 'self' => $this->linkManager->getRequestLink($request), ]; - // If this is a collection we need to append the pager data. if ($this->cardinality !== 1) { // Add the pager links. $rasterized['links'] += $this->linkManager->getPagerLinks($request, $this->linkContext);