Skip to content

Commit 2204deb

Browse files
committed
Add phpstan
1 parent 8978231 commit 2204deb

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor/
2-
composer.lock
2+
composer.lock
3+
*.cache

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fix: cbf
88
vendor/bin/php-cs-fixer fix
99

1010
.PHONY: test
11-
test: cs
11+
test: cs phpstan
1212
vendor/bin/phpunit
1313

1414
.PHONY: cs
@@ -17,4 +17,8 @@ cs:
1717

1818
.PHONY: cbf
1919
cbf:
20-
vendor/bin/phpcbf
20+
vendor/bin/phpcbf
21+
22+
.PHONY: phpstan
23+
phpstan:
24+
vendor/bin/phpstan analyse

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.1 | ^8.0"
13+
"php": "^7.2 | ^8.0"
1414
},
1515
"autoload": {
1616
"psr-4": {
@@ -21,7 +21,8 @@
2121
"phpunit/phpunit": "~7.5 | ~9.0",
2222
"squizlabs/php_codesniffer": "^3.5",
2323
"corpus/coding-standard": "^0.6.0",
24-
"friendsofphp/php-cs-fixer": "^2.17"
24+
"friendsofphp/php-cs-fixer": "^2.17",
25+
"phpstan/phpstan": "^1.12"
2526
},
2627
"config": {
2728
"allow-plugins": {

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- src
5+
phpVersion: 70200

src/Status.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ abstract class Status {
7272
public const NotExtended = 510; // RFC 2774, 7
7373
public const NetworkAuthenticationRequired = 511; // RFC 6585, 6
7474

75+
/** @var array<int,string> */
7576
public static $statusText = [
7677
self::StatusContinue => 'Continue',
7778
self::SwitchingProtocols => 'Switching Protocols',

0 commit comments

Comments
 (0)