|
|
@@ -251,9 +251,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Build pagination params.
|
|
|
*
|
|
|
- * @param array $data Paginator data containing keys 'options',
|
|
|
+ * @param array<string, mixed> $data Paginator data containing keys 'options',
|
|
|
* 'count', 'defaults', 'finder', 'numResults'.
|
|
|
- * @return array Paging params.
|
|
|
+ * @return array<string, mixed> Paging params.
|
|
|
*/
|
|
|
protected function buildParams(array $data): array
|
|
|
{
|
|
|
@@ -284,9 +284,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Add "page" and "pageCount" params.
|
|
|
*
|
|
|
- * @param array $params Paging params.
|
|
|
+ * @param array<string, mixed> $params Paging params.
|
|
|
* @param array $data Paginator data.
|
|
|
- * @return array Updated params.
|
|
|
+ * @return array<string, mixed> Updated params.
|
|
|
*/
|
|
|
protected function addPageCountParams(array $params, array $data): array
|
|
|
{
|
|
|
@@ -309,9 +309,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Add "start" and "end" params.
|
|
|
*
|
|
|
- * @param array $params Paging params.
|
|
|
+ * @param array<string, mixed> $params Paging params.
|
|
|
* @param array $data Paginator data.
|
|
|
- * @return array Updated params.
|
|
|
+ * @return array<string, mixed> Updated params.
|
|
|
*/
|
|
|
protected function addStartEndParams(array $params, array $data): array
|
|
|
{
|
|
|
@@ -331,9 +331,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Add "prevPage" and "nextPage" params.
|
|
|
*
|
|
|
- * @param array $params Paginator params.
|
|
|
+ * @param array<string, mixed> $params Paginator params.
|
|
|
* @param array $data Paging data.
|
|
|
- * @return array Updated params.
|
|
|
+ * @return array<string, mixed> Updated params.
|
|
|
*/
|
|
|
protected function addPrevNextParams(array $params, array $data): array
|
|
|
{
|
|
|
@@ -350,9 +350,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Add sorting / ordering params.
|
|
|
*
|
|
|
- * @param array $params Paginator params.
|
|
|
+ * @param array<string, mixed> $params Paginator params.
|
|
|
* @param array $data Paging data.
|
|
|
- * @return array Updated params.
|
|
|
+ * @return array<string, mixed> Updated params.
|
|
|
*/
|
|
|
protected function addSortingParams(array $params, array $data): array
|
|
|
{
|
|
|
@@ -459,9 +459,9 @@ class Paginator implements PaginatorInterface
|
|
|
* combined together. You can change config value `allowedParameters` to modify
|
|
|
* which options/values can be set using request parameters.
|
|
|
*
|
|
|
- * @param array $params Request params.
|
|
|
+ * @param array<string, mixed> $params Request params.
|
|
|
* @param array $settings The settings to merge with the request data.
|
|
|
- * @return array Array of merged options.
|
|
|
+ * @return array<string, mixed> Array of merged options.
|
|
|
*/
|
|
|
public function mergeOptions(array $params, array $settings): array
|
|
|
{
|
|
|
@@ -481,8 +481,8 @@ class Paginator implements PaginatorInterface
|
|
|
* repository, the general settings will be used.
|
|
|
*
|
|
|
* @param string $alias Model name to get settings for.
|
|
|
- * @param array $settings The settings which is used for combining.
|
|
|
- * @return array An array of pagination settings for a model,
|
|
|
+ * @param array<string, mixed> $settings The settings which is used for combining.
|
|
|
+ * @return array<string, mixed> An array of pagination settings for a model,
|
|
|
* or the general settings.
|
|
|
*/
|
|
|
public function getDefaults(string $alias, array $settings): array
|
|
|
@@ -530,7 +530,7 @@ class Paginator implements PaginatorInterface
|
|
|
*
|
|
|
* @param \Cake\Datasource\RepositoryInterface $object Repository object.
|
|
|
* @param array<string, mixed> $options The pagination options being used for this request.
|
|
|
- * @return array An array of options with sort + direction removed and
|
|
|
+ * @return array<string, mixed> An array of options with sort + direction removed and
|
|
|
* replaced with order if possible.
|
|
|
*/
|
|
|
public function validateSort(RepositoryInterface $object, array $options): array
|
|
|
@@ -593,9 +593,9 @@ class Paginator implements PaginatorInterface
|
|
|
/**
|
|
|
* Remove alias if needed.
|
|
|
*
|
|
|
- * @param array $fields Current fields
|
|
|
+ * @param array<string, mixed> $fields Current fields
|
|
|
* @param string $model Current model alias
|
|
|
- * @return array $fields Unaliased fields where applicable
|
|
|
+ * @return array<string, mixed> $fields Unaliased fields where applicable
|
|
|
*/
|
|
|
protected function _removeAliases(array $fields, string $model): array
|
|
|
{
|
|
|
@@ -664,7 +664,7 @@ class Paginator implements PaginatorInterface
|
|
|
* Check the limit parameter and ensure it's within the maxLimit bounds.
|
|
|
*
|
|
|
* @param array<string, mixed> $options An array of options with a limit key to be checked.
|
|
|
- * @return array An array of options for pagination.
|
|
|
+ * @return array<string, mixed> An array of options for pagination.
|
|
|
*/
|
|
|
public function checkLimit(array $options): array
|
|
|
{
|