Skip to content

Commit 5906540

Browse files
committed
:octocat: static analysis update, fixed phpcs config, cleanup
(cherry picked from commit 96d568d)
1 parent 27ead33 commit 5906540

21 files changed

+318
-229
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: "Install dependencies with composer"
5353
uses: ramsey/composer-install@v3
5454

55+
- name: "Run PHP_CodeSniffer"
56+
run: php vendor/bin/phpcs -v
57+
5558
- name: "Run PHPStan"
5659
run: php vendor/bin/phpstan
5760

@@ -95,7 +98,7 @@ jobs:
9598
run: php vendor/bin/phpunit --colors=always --configuration=phpunit.xml.dist
9699

97100
- name: "Send code coverage report to Codecov.io"
98-
uses: codecov/codecov-action@v4
101+
uses: codecov/codecov-action@v5
99102
with:
100103
token: ${{ secrets.CODECOV_TOKEN }}
101104
files: .build/coverage/clover.xml

composer.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
"ext-json": "*",
4141
"ext-sodium": "*",
4242
"phpmd/phpmd": "^2.15",
43-
"phpstan/phpstan": "^1.11",
44-
"phpstan/phpstan-deprecation-rules": "^1.2",
43+
"phpstan/phpstan": "^2.1.27",
44+
"phpstan/phpstan-deprecation-rules": "^2.0.3",
4545
"phpunit/phpunit": "^9.6",
46-
"squizlabs/php_codesniffer": "^3.10"
46+
"slevomat/coding-standard": "^8.23",
47+
"squizlabs/php_codesniffer": "^4.0"
4748
},
4849
"suggest": {
4950
"chillerlan/php-qrcode": "Create QR Codes for use with an authenticator app."
@@ -61,11 +62,15 @@
6162
"scripts": {
6263
"phpcs": "@php vendor/bin/phpcs",
6364
"phpunit": "@php vendor/bin/phpunit",
64-
"phpstan": "@php vendor/bin/phpstan"
65+
"phpstan": "@php vendor/bin/phpstan",
66+
"phpstan-baseline": "@php vendor/bin/phpstan --generate-baseline"
6567
},
6668
"config": {
6769
"lock": false,
6870
"sort-packages": true,
69-
"platform-check": true
71+
"platform-check": true,
72+
"allow-plugins": {
73+
"dealerdirect/phpcodesniffer-composer-installer": true
74+
}
7075
}
7176
}

examples/hotp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @copyright 2017 Smiley
88
* @license MIT
99
*/
10+
declare(strict_types=1);
1011

1112
use chillerlan\Authenticator\{Authenticator, AuthenticatorOptions};
1213
use chillerlan\Authenticator\Authenticators\AuthenticatorInterface;

examples/steam.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @copyright 2017 Smiley
88
* @license MIT
99
*/
10+
declare(strict_types=1);
1011

1112
use chillerlan\Authenticator\{Authenticator, AuthenticatorOptions};
1213
use chillerlan\Authenticator\Authenticators\AuthenticatorInterface;

examples/totp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @copyright 2017 Smiley
88
* @license MIT
99
*/
10+
declare(strict_types=1);
1011

1112
use chillerlan\Authenticator\{Authenticator, AuthenticatorOptions};
1213
use chillerlan\Authenticator\Authenticators\AuthenticatorInterface;

0 commit comments

Comments
 (0)