Skip to content

Commit 7b2e9a2

Browse files
committed
Added PHPStan
1 parent 24a051f commit 7b2e9a2

11 files changed

+996
-64
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ vendor/
66
*.cache
77
*.yml
88
phpcs.xml
9+
phpstan.neon
910
Dockerfile
1011
README.md

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
/docker-compose.yml export-ignore
1010
/Dockerfile export-ignore
1111
/phpcs.xml export-ignore
12+
/phpstan.neon export-ignore
1213
/phpunit.xml export-ignore
1314
/Makefile export-ignore

composer.json

+27-12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
"email": "[email protected]"
1010
}
1111
],
12+
"config": {
13+
"sort-packages": true,
14+
"prefer-stable": true,
15+
"optimize-autoloader": true
16+
},
17+
"extra": {
18+
"branch-alias": {
19+
"dev-v2": "2.0.x-dev"
20+
},
21+
"zf": {
22+
"config-provider": "CoiSA\\ErrorHandler\\Container\\ConfigProvider"
23+
}
24+
},
1225
"require": {
1326
"php": "^7.2",
1427
"psr/http-server-middleware": "^1.0",
@@ -27,29 +40,31 @@
2740
}
2841
},
2942
"require-dev": {
30-
"phpunit/phpunit": "^8.3",
43+
"coisa/http": "1.0.x-dev",
3144
"friendsofphp/php-cs-fixer": "^2.15",
45+
"jangregor/phpstan-prophecy": "^0.4.2",
3246
"phly/phly-event-dispatcher": "^1.0",
33-
"zendframework/zend-servicemanager": "^3.4",
47+
"phpstan/phpstan": "^0.11.16",
48+
"phpstan/phpstan-strict-rules": "^0.11.1",
49+
"phpunit/phpunit": "^8.3",
50+
"squizlabs/php_codesniffer": "^3.4",
3451
"zendframework/zend-diactoros": "^2.1",
35-
"coisa/http": "1.0.x-dev",
36-
"squizlabs/php_codesniffer": "^3.4"
52+
"zendframework/zend-servicemanager": "^3.4"
3753
},
3854
"scripts": {
55+
"check": [
56+
"@cs-check",
57+
"@sniff",
58+
"@test",
59+
"@analyze"
60+
],
61+
"analyze": "phpstan analyze --level max ./src ./tests",
3962
"cs-check": "php-cs-fixer fix --dry-run --diff",
4063
"cs-fix": [
4164
"php-cs-fixer fix",
4265
"phpcbf"
4366
],
4467
"sniff": "phpcs",
4568
"test": "phpunit --coverage-text"
46-
},
47-
"extra": {
48-
"branch-alias": {
49-
"dev-v2": "2.0.x-dev"
50-
},
51-
"zf": {
52-
"config-provider": "CoiSA\\ErrorHandler\\Container\\ConfigProvider"
53-
}
5469
}
5570
}

0 commit comments

Comments
 (0)