@@ -12,5 +12,5 @@ |
||
| 12 | 12 | * @param boolean $identifierOnly optional, defaults to false |
| 13 | 13 | * @return ResourceIdentifierObject|ResourceObject |
| 14 | 14 | */ |
| 15 | - public function getResource($identifierOnly=false); |
|
| 15 | + public function getResource($identifierOnly = false); |
|
| 16 | 16 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @throws Exception if generating json fails |
| 22 | 22 | */ |
| 23 | - public function toJson(array $options=[]); |
|
| 23 | + public function toJson(array $options = []); |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * send jsonapi response to the browser |
@@ -29,5 +29,5 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @param array $options optional |
| 31 | 31 | */ |
| 32 | - public function sendResponse(array $options=[]); |
|
| 32 | + public function sendResponse(array $options = []); |
|
| 33 | 33 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * @param int $exactTotal optional |
| 99 | 99 | * @param int $bestGuessTotal optional |
| 100 | 100 | */ |
| 101 | - public function setCount(PaginableInterface $paginable, $exactTotal=null, $bestGuessTotal=null) { |
|
| 101 | + public function setCount(PaginableInterface $paginable, $exactTotal = null, $bestGuessTotal = null) { |
|
| 102 | 102 | $this->setPaginationMeta($paginable, $exactTotal, $bestGuessTotal); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ]; |
| 192 | 192 | |
| 193 | 193 | if ($resource instanceof ResourceDocument) { |
| 194 | - $resource->addMeta('page', $metadata, $level=Document::LEVEL_RESOURCE); |
|
| 194 | + $resource->addMeta('page', $metadata, $level = Document::LEVEL_RESOURCE); |
|
| 195 | 195 | } |
| 196 | 196 | else { |
| 197 | 197 | $resource->addMeta('page', $metadata); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | * @param int $bestGuessTotal optional |
| 214 | 214 | * @param boolean $rangeIsTruncated optional, if both after and before are supplied but the items exceed requested or max size |
| 215 | 215 | */ |
| 216 | - public function setPaginationMeta(PaginableInterface $paginable, $exactTotal=null, $bestGuessTotal=null, $rangeIsTruncated=null) { |
|
| 216 | + public function setPaginationMeta(PaginableInterface $paginable, $exactTotal = null, $bestGuessTotal = null, $rangeIsTruncated = null) { |
|
| 217 | 217 | $metadata = []; |
| 218 | 218 | |
| 219 | 219 | if ($exactTotal !== null) { |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @param string $specificDetails optional |
| 247 | 247 | * @return ErrorObject |
| 248 | 248 | */ |
| 249 | - public function getUnsupportedSortErrorObject($genericTitle=null, $specificDetails=null) { |
|
| 249 | + public function getUnsupportedSortErrorObject($genericTitle = null, $specificDetails = null) { |
|
| 250 | 250 | $errorObject = new ErrorObject('Unsupported sort'); |
| 251 | 251 | $errorObject->appendTypeLink('https://jsonapi.org/profiles/ethanresnick/cursor-pagination/unsupported-sort'); |
| 252 | 252 | $errorObject->blameQueryParameter('sort'); |
@@ -276,12 +276,12 @@ discard block |
||
| 276 | 276 | * @param string $specificDetails optional, e.g. 'You requested a size of 200, but 100 is the maximum.' |
| 277 | 277 | * @return ErrorObject |
| 278 | 278 | */ |
| 279 | - public function getMaxPageSizeExceededErrorObject($maxSize, $genericTitle=null, $specificDetails=null) { |
|
| 279 | + public function getMaxPageSizeExceededErrorObject($maxSize, $genericTitle = null, $specificDetails = null) { |
|
| 280 | 280 | $errorObject = new ErrorObject('Max page size exceeded'); |
| 281 | 281 | $errorObject->appendTypeLink('https://jsonapi.org/profiles/ethanresnick/cursor-pagination/max-size-exceeded'); |
| 282 | 282 | $errorObject->blameQueryParameter('page[size]'); |
| 283 | 283 | $errorObject->setHttpStatusCode(400); |
| 284 | - $errorObject->addMeta('page', $value=['maxSize' => $maxSize]); |
|
| 284 | + $errorObject->addMeta('page', $value = ['maxSize' => $maxSize]); |
|
| 285 | 285 | |
| 286 | 286 | if ($genericTitle !== null) { |
| 287 | 287 | $errorObject->setHumanExplanation($genericTitle, $specificDetails); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @param string $specificDetails optional, e.g. 'page[size] must be a positive integer; got 0' |
| 308 | 308 | * @return ErrorObject |
| 309 | 309 | */ |
| 310 | - public function getInvalidParameterValueErrorObject($queryParameter, $typeLink=null, $genericTitle=null, $specificDetails=null) { |
|
| 310 | + public function getInvalidParameterValueErrorObject($queryParameter, $typeLink = null, $genericTitle = null, $specificDetails = null) { |
|
| 311 | 311 | $errorObject = new ErrorObject('Invalid parameter value'); |
| 312 | 312 | $errorObject->blameQueryParameter($queryParameter); |
| 313 | 313 | $errorObject->setHttpStatusCode(400); |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | * @param string $specificDetails optional |
| 336 | 336 | * @return ErrorObject |
| 337 | 337 | */ |
| 338 | - public function getRangePaginationNotSupportedErrorObject($genericTitle=null, $specificDetails=null) { |
|
| 338 | + public function getRangePaginationNotSupportedErrorObject($genericTitle = null, $specificDetails = null) { |
|
| 339 | 339 | $errorObject = new ErrorObject('Range pagination not supported'); |
| 340 | 340 | $errorObject->appendTypeLink('https://jsonapi.org/profiles/ethanresnick/cursor-pagination/range-pagination-not-supported'); |
| 341 | 341 | $errorObject->setHttpStatusCode(400); |