Skip to content

Commit 96d568d

Browse files
committed
:octocat: static analysis update, fixed phpcs config, cleanup
1 parent 8c222b0 commit 96d568d

22 files changed

+318
-226
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
- name: "Install dependencies with composer"
5454
uses: ramsey/composer-install@v3
5555

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

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": "^11.2",
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)