Skip to content

Commit bab8870

Browse files
Tomáš Votrubajaapio
authored andcommitted
Add PHPStan and bump to max level (#139)
* composer: put require- together * add phpstan * add phpstan to travis * phpstan fixes * phpstan fixes * phpstan fixes * drop null defaults since every property is null by default * DescriptionFactory: fix parse nullable type * travis: add phpstan max * travis: fix phpstan config
1 parent c19b4d1 commit bab8870

22 files changed

+1050
-63
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ script:
2222
- vendor/bin/phpunit --coverage-clover=coverage.xml -v
2323
# coding style
2424
- if [[ $STATIC_ANALYSIS != "" ]]; then temp/ecs/bin/ecs check src tests; fi
25+
- if [[ $STATIC_ANALYSIS != "" ]]; then vendor/bin/phpstan analyse src --level max --configuration phpstan.neon; fi
2526

2627
after_script:
2728
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar;

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
"phpdocumentor/type-resolver": "^0.4",
1616
"webmozart/assert": "^1.0"
1717
},
18+
"require-dev": {
19+
"mockery/mockery": "^1.0",
20+
"phpunit/phpunit": "^6.4",
21+
"doctrine/instantiator": "^1.0",
22+
"phpstan/phpstan": "^0.9.0"
23+
},
1824
"autoload": {
1925
"psr-4": {
2026
"phpDocumentor\\Reflection\\": "src"
@@ -25,11 +31,6 @@
2531
"phpDocumentor\\Reflection\\": "tests/unit"
2632
}
2733
},
28-
"require-dev": {
29-
"mockery/mockery": "^1.0",
30-
"phpunit/phpunit": "^6.4",
31-
"doctrine/instantiator": "^1.0"
32-
},
3334
"extra": {
3435
"branch-alias": {
3536
"dev-master": "4.x-dev"

0 commit comments

Comments
 (0)