Clean up
This commit is contained in:
parent
dc8ec9ee1d
commit
f2aac7f78e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Forust.
|
||||
* This file is part of tobyz/json-api-server.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue