Skip to content

Commit 0be164f

Browse files
committed
Add phpstan
1 parent a8a6c3a commit 0be164f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
/.gitignore export-ignore
1212
/.travis.yml export-ignore
1313
/phpcs.xml.dist export-ignore
14+
/phpstan.neon.dist export-ignore
1415
/phpunit.xml.dist export-ignore

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,21 @@
3838
"nikic/php-parser": "^4.4"
3939
},
4040
"require-dev": {
41+
"phpstan/phpstan": "^0.12.25",
4142
"phpunit/phpunit": "^7.5",
4243
"squizlabs/php_codesniffer": "^3.5"
4344
},
4445
"scripts": {
4546
"test": [
4647
"@phpunit",
47-
"@phpcs"
48+
"@phpcs",
49+
"@phpstan"
4850
],
4951
"phpunit": "phpunit",
50-
"phpcs": "phpcs"
52+
"phpcs": "phpcs",
53+
"phpstan": "phpstan analyse src --memory-limit=-1"
54+
},
55+
"config": {
56+
"sort-packages": true
5157
}
5258
}

phpstan.neon.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: max
3+
ignoreErrors:
4+
- message: '/Parameter \#3 \$microseconds of function stream_set_timeout expects int, int\|null given./'
5+
path: src/FileStreamWrapper.php
6+
count: 1

0 commit comments

Comments
 (0)