@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @link https://github.com/Phauthentic |
| 11 | 11 | * @license https://opensource.org/licenses/mit-license.php MIT License |
| 12 | 12 | */ |
| 13 | -declare(strict_types = 1); |
|
| 13 | +declare(strict_types=1); |
|
| 14 | 14 | |
| 15 | 15 | namespace Phauthentic\Pagination\Paginator; |
| 16 | 16 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * Copyright (c) Phauthentic (https://github.com/Phauthentic) |
| 5 | 5 | * |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function getPage(array $params, string $name = 'page'): int |
| 44 | 44 | { |
| 45 | 45 | if (isset($params[$name])) { |
| 46 | - return (int)$params[$name]; |
|
| 46 | + return (int) $params[$name]; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | return 1; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function getLimit(array $params, string $name = 'limit'): int |
| 60 | 60 | { |
| 61 | 61 | if (isset($params[$name])) { |
| 62 | - return (int)$params['limit']; |
|
| 62 | + return (int) $params['limit']; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | return 20; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function getSortBy(array $params, string $name = 'sort'): ?string |
| 76 | 76 | { |
| 77 | 77 | if (!empty($params[$name])) { |
| 78 | - return (string)$params[$name]; |
|
| 78 | + return (string) $params[$name]; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | return null; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function getDirection(array $params, string $name = 'direction'): string |
| 92 | 92 | { |
| 93 | 93 | if (isset($params[$name])) { |
| 94 | - return (string)$params[$name]; |
|
| 94 | + return (string) $params[$name]; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return 'desc'; |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | $params = new static::$paginationParamsClass(); |
| 118 | 118 | |
| 119 | 119 | foreach ($this->map as $setter => $value) { |
| 120 | - $setterMethod = 'set' . $setter; |
|
| 121 | - $getterMethod = 'get' . $setter; |
|
| 120 | + $setterMethod = 'set'.$setter; |
|
| 121 | + $getterMethod = 'get'.$setter; |
|
| 122 | 122 | |
| 123 | 123 | if (!is_string($value) && is_callable($value)) { |
| 124 | 124 | $value = $value($request); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @link https://github.com/Phauthentic |
| 11 | 11 | * @license https://opensource.org/licenses/mit-license.php MIT License |
| 12 | 12 | */ |
| 13 | -declare(strict_types = 1); |
|
| 13 | +declare(strict_types=1); |
|
| 14 | 14 | |
| 15 | 15 | namespace Phauthentic\Pagination\Paginator; |
| 16 | 16 | |