Skip to content

Commit bb682ef

Browse files
committed
Fix issues with new slevomat rules
1 parent 7e0b7b6 commit bb682ef

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/php.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
with:
163163
# Should be the higest supported version, so we can use the newest tools
164164
php-version: '8.4'
165-
tools: composer, composer-require-checker, composer-unused, phpcs
165+
tools: composer, composer-require-checker, composer-unused
166166
extensions: ctype, date, dom, filter, hash, intl, mbstring, opcache, openssl, pcre, spl, xml
167167

168168
- name: Setup problem matchers for PHP
@@ -194,12 +194,13 @@ jobs:
194194
composer-unused \
195195
--excludePackage=slevomat/coding-standard \
196196
--excludePackage=symfony/phpunit-bridge \
197+
--excludePackage=squizlabs/php_codesniffer \
197198
--excludePackage=phpstan/phpstan \
198199
--excludePackage=phpstan/extension-installer \
199200
--excludePackage=phpstan/phpstan-mockery
200201
201202
- name: PHP Code Sniffer
202-
run: phpcs
203+
run: vendor/bin/phpcs
203204

204205
- name: PHPStan
205206
run: |

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"phpunit/phpunit": "^11.5 || ^12.3",
3131
"psr/log": "^3.0",
3232
"slevomat/coding-standard": "^8.20",
33+
"squizlabs/php_codesniffer": "^3.13 || ^4.0",
3334
"symfony/phpunit-bridge": "^7.3 || ^8.0"
3435
},
3536
"require-dev": {

lib/ArrayLogger.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@ class ArrayLogger implements LoggingHandlerInterface
1717
*/
1818
public array $logs = [];
1919

20+
2021
public function __construct(Configuration $config)
2122
{
2223
// don't do anything with the configuration
2324
}
2425

26+
2527
public function log(int $level, string $string): void
2628
{
2729
$this->logs[$level][] = $string;
2830
}
2931

32+
3033
public function setLogFormat(string $format): void
3134
{
3235
// ignored

0 commit comments

Comments
 (0)