diff --git a/src/Endpoint/Concerns/SavesData.php b/src/Endpoint/Concerns/SavesData.php index bdb83cc..86df7e8 100644 --- a/src/Endpoint/Concerns/SavesData.php +++ b/src/Endpoint/Concerns/SavesData.php @@ -131,7 +131,6 @@ trait SavesData */ private function assertFieldsWritable(array $data, $model, Context $context) { - foreach ($this->resource->getSchema()->getFields() as $field) { if (! has_value($data, $field)) { continue; diff --git a/src/Endpoint/Index.php b/src/Endpoint/Index.php index 7f53440..04627e3 100644 --- a/src/Endpoint/Index.php +++ b/src/Endpoint/Index.php @@ -123,7 +123,7 @@ class Index return $selfUrl.($queryString ? '?'.$queryString : ''); } - private function buildPaginationLinks(Request $request, int $offset, ?int $limit, int $count, ?int $total) + private function buildPaginationLinks(Request $request, int $offset, ?int $limit, int $count, ?int $total): array { $paginationLinks = []; $schema = $this->resource->getSchema(); @@ -153,7 +153,7 @@ class Index return $paginationLinks; } - private function sort($query, Context $context) + private function sort($query, Context $context): void { $schema = $this->resource->getSchema(); @@ -202,7 +202,7 @@ class Index return $sort; } - private function paginate($query, Context $context) + private function paginate($query, Context $context): array { $schema = $this->resource->getSchema(); $queryParams = $context->getRequest()->getQueryParams(); diff --git a/src/Schema/Concerns/HasMeta.php b/src/Schema/Concerns/HasMeta.php index 1c9961d..b482586 100644 --- a/src/Schema/Concerns/HasMeta.php +++ b/src/Schema/Concerns/HasMeta.php @@ -1,7 +1,7 @@ *