Skip to content
Permalink
Browse files

Static analysis with PHPStan

  • Loading branch information...
ondrejmirtes committed Dec 29, 2016
1 parent 358b255 commit 7963286183e0012ff83c78185229975d08b01442
Showing with 14 additions and 0 deletions.
  1. +11 −0 .travis.yml
  2. +3 −0 phpstan.neon
@@ -36,6 +36,12 @@ matrix:
- php: 7.0
env: PHPCS=1 DEFAULT=0

- php: 7.0
env: PHPSTAN=1 DEFAULT=0

- php: 7.1
env: PHPSTAN=1 DEFAULT=0

- php: hhvm
env: HHVM=1 DB=sqlite db_dsn='sqlite:///:memory:'

@@ -44,6 +50,10 @@ matrix:

allow_failures:
- php: hhvm
- php: 7.0
env: PHPSTAN=1 DEFAULT=0
- php: 7.1
env: PHPSTAN=1 DEFAULT=0

before_install:
- if [ $HHVM != 1 && $TRAVIS_PHP_VERSION != 7.* ]; then phpenv config-rm xdebug.ini; fi
@@ -78,6 +88,7 @@ script:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi

- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:dev-master && vendor/bin/phpstan analyse -c phpstan.neon -l 0 src; fi

after_success:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi
@@ -0,0 +1,3 @@
parameters:
autoload_files:
- %rootDir%/../../../src/basics.php

0 comments on commit 7963286

Please sign in to comment.
You can’t perform that action at this time.