Skip to content

Commit

Permalink
Improving PHPStan configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 2, 2017
1 parent 1435115 commit 1050585
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -96,7 +96,7 @@ script:

- if [[ $PHPCS = 1 ]]; then composer cs-check; fi
- if [[ $PHPCS = 3 ]]; then vendor/bin/phpcs -p -s --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
- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.5.1 && 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
Expand Down
11 changes: 11 additions & 0 deletions phpstan.neon
@@ -1,3 +1,14 @@
parameters:
autoload_files:
- %rootDir%/../../../src/basics.php
ignoreErrors:
- '#Function wincache_ucache_[a-zA-Z0-9_]+ not found#'
- '#Function xcache_[a-zA-Z0-9_]+ not found#'
- '#Function fastcgi_[a-zA-Z0-9_]+ not found#'
- '#Function apache_[a-zA-Z0-9_]+ not found#'
- '#Cake\\Database\\Type\\[a-zA-Z0-9_]+Type::__construct\(\) does not call parent constructor from Cake\\Database\\Type#'
- '#Constructor of class Cake\\[a-zA-Z0-9_\\]+ has an unused parameter#'
- '#Call to an undefined method Cake\\Console\\Shell::main\(\)#'
- '#Access to undefined constant Memcached::OPT_CLIENT_MODE#'
- '#Access to undefined constant Memcached::DYNAMIC_CLIENT_MODE#'
- '#Access to undefined constant PDO::SQLSRV_ENCODING_BINARY#'

0 comments on commit 1050585

Please sign in to comment.