Commit 480878aa authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Typage.

Showing with 6 additions and 4 deletions
+6 -4
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment