Skip to content

Commit a9d9a49

Browse files
authored
Merge pull request #829 from garak/fix-ci-cs
fix cs check in CI
2 parents c3ba635 + b310f90 commit a9d9a49

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
uses: actions/checkout@v4
2626
- name: Run PHP-CS-Fixer
2727
uses: docker://oskarstark/php-cs-fixer-ga
28+
with:
29+
args: --diff --dry-run
2830

2931
twig-cs-fixer:
3032
runs-on: ubuntu-24.04

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"twig/twig": "^3.0"
2929
},
3030
"require-dev": {
31-
"phpstan/phpstan": "^1.11",
32-
"phpunit/phpunit": "^10.5 || ^11.3",
31+
"phpstan/phpstan": "^1.12",
32+
"phpunit/phpunit": "^10.5 || ^11.5 || ^12.0",
3333
"symfony/expression-language": "^6.4 || ^7.0",
3434
"symfony/templating": "^6.4 || ^7.0"
3535
},

src/Twig/Extension/PaginationExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Knp\Bundle\PaginatorBundle\Twig\Extension;
44

55
use Twig\Extension\AbstractExtension;
6-
use Twig\TwigFilter;
76
use Twig\TwigFunction;
87

98
final class PaginationExtension extends AbstractExtension

src/Twig/Extension/PaginationRuntime.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,26 +109,26 @@ public function filter(
109109
}
110110

111111
/**
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+
*
115115
* @return array<string, mixed>
116116
*/
117117
public function getQueryParams(array $query, int $page, array $options = []): array
118118
{
119119
$pageName = $this->pageName;
120-
if (isset($options['pageParameterName']) && is_string($options['pageParameterName'])) {
120+
if (isset($options['pageParameterName']) && \is_string($options['pageParameterName'])) {
121121
$pageName = $options['pageParameterName'];
122122
}
123123

124-
if ($page === 1 && $this->skipFirstPageLink) {
124+
if (1 === $page && $this->skipFirstPageLink) {
125125
if (isset($query[$pageName])) {
126126
unset($query[$pageName]);
127127
}
128128

129129
return $query;
130130
}
131131

132-
return array_merge($query, [$pageName => $page]);
132+
return \array_merge($query, [$pageName => $page]);
133133
}
134134
}

0 commit comments

Comments
 (0)