@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | $this->addContext('maintenance_state', app()->isInMaintenance()); |
| 317 | 317 | |
| 318 | 318 | // Set nonce for Content Security Policy |
| 319 | - $nonces = $this->request->getAttribute(SecurityPolicy::class); |
|
| 319 | + $nonces = $this->request->getAttribute(SecurityPolicy::class); |
|
| 320 | 320 | |
| 321 | 321 | if ($nonces !== null) { |
| 322 | 322 | $this->addContext('style_nonce', $nonces['nonces']['style']); |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | protected function handleRestPagination( |
| 603 | 603 | RepositoryInterface $repository, |
| 604 | 604 | EntityQuery $query, |
| 605 | - string|array $sortFields = 'name', |
|
| 605 | + string | array $sortFields = 'name', |
|
| 606 | 606 | string $sortDir = 'ASC' |
| 607 | 607 | ): void { |
| 608 | 608 | if ($this->all === false) { |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | protected function restResponse( |
| 644 | 644 | mixed $data = [], |
| 645 | 645 | int $statusCode = 200, |
| 646 | - string|int $code = 'OK' |
|
| 646 | + string | int $code = 'OK' |
|
| 647 | 647 | ): ResponseInterface { |
| 648 | 648 | $extras = $this->context->all(); |
| 649 | 649 | if ($this->pagination->getTotalItems() > 0) { |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | * |
| 668 | 668 | * @return ResponseInterface |
| 669 | 669 | */ |
| 670 | - protected function restCreatedResponse(mixed $data = [], string|int $code = 'CREATED'): ResponseInterface |
|
| 670 | + protected function restCreatedResponse(mixed $data = [], string | int $code = 'CREATED'): ResponseInterface |
|
| 671 | 671 | { |
| 672 | 672 | return $this->restResponse( |
| 673 | 673 | $data, |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | * |
| 683 | 683 | * @return ResponseInterface |
| 684 | 684 | */ |
| 685 | - protected function restNoContentResponse(string|int $code = 'NO_CONTENT'): ResponseInterface |
|
| 685 | + protected function restNoContentResponse(string | int $code = 'NO_CONTENT'): ResponseInterface |
|
| 686 | 686 | { |
| 687 | 687 | return $this->restResponse( |
| 688 | 688 | [], |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | protected function restErrorResponse( |
| 704 | 704 | string $message, |
| 705 | 705 | int $statusCode = 401, |
| 706 | - string|int $code = 'ERROR', |
|
| 706 | + string | int $code = 'ERROR', |
|
| 707 | 707 | array $extras = [] |
| 708 | 708 | ): ResponseInterface { |
| 709 | 709 | return new RestResponse( |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | protected function restServerErrorResponse( |
| 727 | 727 | string $message = '', |
| 728 | - string|int $code = 'INTERNAL_SERVER_ERROR' |
|
| 728 | + string | int $code = 'INTERNAL_SERVER_ERROR' |
|
| 729 | 729 | ): ResponseInterface { |
| 730 | 730 | return $this->restErrorResponse( |
| 731 | 731 | $message, |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | */ |
| 745 | 745 | protected function restBadRequestErrorResponse( |
| 746 | 746 | string $message = '', |
| 747 | - string|int $code = 'BAD_REQUEST' |
|
| 747 | + string | int $code = 'BAD_REQUEST' |
|
| 748 | 748 | ): ResponseInterface { |
| 749 | 749 | return $this->restErrorResponse( |
| 750 | 750 | $message, |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | */ |
| 764 | 764 | protected function restConflictErrorResponse( |
| 765 | 765 | string $message = '', |
| 766 | - string|int $code = 'DUPLICATE_RESOURCE' |
|
| 766 | + string | int $code = 'DUPLICATE_RESOURCE' |
|
| 767 | 767 | ): ResponseInterface { |
| 768 | 768 | return $this->restErrorResponse( |
| 769 | 769 | $message, |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | */ |
| 783 | 783 | protected function restNotFoundErrorResponse( |
| 784 | 784 | string $message = '', |
| 785 | - string|int $code = 'RESOURCE_NOT_FOUND' |
|
| 785 | + string | int $code = 'RESOURCE_NOT_FOUND' |
|
| 786 | 786 | ): ResponseInterface { |
| 787 | 787 | return $this->restErrorResponse( |
| 788 | 788 | $message, |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | */ |
| 802 | 802 | protected function restUnauthorizedErrorResponse( |
| 803 | 803 | string $message = '', |
| 804 | - string|int $code = 'UNAUTHORIZED_ACCESS' |
|
| 804 | + string | int $code = 'UNAUTHORIZED_ACCESS' |
|
| 805 | 805 | ): ResponseInterface { |
| 806 | 806 | return $this->restErrorResponse( |
| 807 | 807 | $message, |
@@ -820,7 +820,7 @@ discard block |
||
| 820 | 820 | */ |
| 821 | 821 | protected function restFormValidationErrorResponse( |
| 822 | 822 | array $errors = [], |
| 823 | - string|int $code = 'INVALID_INPUT' |
|
| 823 | + string | int $code = 'INVALID_INPUT' |
|
| 824 | 824 | ): ResponseInterface { |
| 825 | 825 | return $this->restErrorResponse( |
| 826 | 826 | $this->lang->tr('Invalid Request Parameter(s)'), |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | mixed $data = [], |
| 68 | 68 | array $extras = [], |
| 69 | 69 | bool $success = true, |
| 70 | - string|int $code = 'OK', |
|
| 70 | + string | int $code = 'OK', |
|
| 71 | 71 | string $message = '', |
| 72 | 72 | int $statusCode = 200, |
| 73 | 73 | string $reasonPhrase = '' |