diff --git a/src/php/Metadata/MetadataFactory.php b/src/php/Metadata/MetadataFactory.php index 2c6ba1fe2861f2aedee3c015cf7698244855f4b4..6878a345444040ade56ee3bba9f1394b8f307cdb 100644 --- a/src/php/Metadata/MetadataFactory.php +++ b/src/php/Metadata/MetadataFactory.php @@ -232,14 +232,16 @@ final class MetadataFactory implements MetadataFactoryInterface $getAttribute = function (string $attrName, $default) use ($resourceMetadata, $type, $name) { return $resourceMetadata->getTypedOperationAttribute($type, $name, $attrName, $default, true); + }; if ($type === OperationType::COLLECTION && $method === 'GET') { $filters = $this->getFilters($class, $getAttribute('filters', [])); - $pagination = $this->buildPagination( - $getAttribute('pagination_enabled', true), - $getAttribute('pagination_client_items_per_page', true) - ); + + $paginationEnabled = (bool)$getAttribute('pagination_enabled', true); + $paginationClientItemsPerPage = (bool)$getAttribute('pagination_client_items_per_page', true); + + $pagination = $this->buildPagination($paginationEnabled, $paginationClientItemsPerPage); } else { $filters = []; $pagination = null;