Skip to content

Commit

Permalink
Add PHPStan to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
lcobucci committed Nov 2, 2017
1 parent 6cb1bbf commit e14cee9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ jobs:
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/humbug

- stage: Static analysis
script:
- ./vendor/bin/phpstan analyse -c phpstan.neon -l max src test
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"require-dev": {
"humbug/humbug": "dev-master@dev",
"mikey179/vfsStream": "^1.6",
"phpstan/phpstan": "^0.9.0@dev",
"phpunit/phpunit": "^6.4",
"squizlabs/php_codesniffer": "^3.1",
"symfony/proxy-manager-bridge": "^3.3|^4.0",
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
ignoreErrors:
# Ignore PHPUnit mock stuff
- '#PHPUnit_Framework_MockObject_MockObject.* given#'
- '#does not accept PHPUnit_Framework_MockObject_MockObject#'
2 changes: 1 addition & 1 deletion test/Config/ContainerConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
final class ContainerConfigurationTest extends \PHPUnit\Framework\TestCase
{
/**
* @var CompilerPassInterface
* @var CompilerPassInterface|\PHPUnit_Framework_MockObject_MockObject
*/
private $pass;

Expand Down

0 comments on commit e14cee9

Please sign in to comment.