File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 3
3
namespace Knp \Bundle \PaginatorBundle \Twig \Extension ;
4
4
5
5
use Twig \Extension \AbstractExtension ;
6
- use Twig \TwigFilter ;
7
6
use Twig \TwigFunction ;
8
7
9
8
final class PaginationExtension extends AbstractExtension
Original file line number Diff line number Diff line change @@ -109,26 +109,26 @@ public function filter(
109
109
}
110
110
111
111
/**
112
- * @param array<string, mixed> $query
113
- * @param int $page
114
- * @param array<string, mixed> $options
112
+ * @param array<string, mixed> $query
113
+ * @param array<string, mixed> $options
114
+ *
115
115
* @return array<string, mixed>
116
116
*/
117
117
public function getQueryParams (array $ query , int $ page , array $ options = []): array
118
118
{
119
119
$ pageName = $ this ->pageName ;
120
- if (isset ($ options ['pageParameterName ' ]) && is_string ($ options ['pageParameterName ' ])) {
120
+ if (isset ($ options ['pageParameterName ' ]) && \ is_string ($ options ['pageParameterName ' ])) {
121
121
$ pageName = $ options ['pageParameterName ' ];
122
122
}
123
123
124
- if ($ page === 1 && $ this ->skipFirstPageLink ) {
124
+ if (1 === $ page && $ this ->skipFirstPageLink ) {
125
125
if (isset ($ query [$ pageName ])) {
126
126
unset($ query [$ pageName ]);
127
127
}
128
128
129
129
return $ query ;
130
130
}
131
131
132
- return array_merge ($ query , [$ pageName => $ page ]);
132
+ return \ array_merge ($ query , [$ pageName => $ page ]);
133
133
}
134
134
}
You can’t perform that action at this time.
0 commit comments