Browse Source

Bump up phpstan to level 2.

ADmad 8 years ago
parent
commit
60b224b654
2 changed files with 9 additions and 1 deletions
  1. 1 1
      .travis.yml
  2. 8 0
      phpstan.neon

+ 1 - 1
.travis.yml

@@ -75,7 +75,7 @@ script:
   - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi
 
   - if [[ $PHPCS = 1 ]]; then composer cs-check; fi
-  - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.8 && vendor/bin/phpstan analyse -c phpstan.neon -l 1 src; fi
+  - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.8 && vendor/bin/phpstan analyse -c phpstan.neon -l 2 src; fi
 
 after_success:
   - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi

+ 8 - 0
phpstan.neon

@@ -16,6 +16,14 @@ parameters:
         - '#Access to an undefined property Cake\\Database\\Driver::\$_connection#'
         - '#Constant XC_TYPE_VAR not found#'
         - '#Class PHPUnit_Runner_Version not found and could not be autoloaded#'
+        - '#Call to an undefined method Cake\\Auth\\Storage\\StorageInterface::getConfig\(\)#'
+        - '#Call to an undefined method Cake\\Auth\\Storage\\StorageInterface::setConfig\(\)#'
+        - '#Call to an undefined method Psr\\Http\\Message\\ResponseInterface::getCookies\(\)#'
+        - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$webroot#'
+        - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$base#'
+        - '#Call to an undefined method Cake\\Collection\\Iterator\\ZipIterator::getInnerIterator\(\)#'
+        - '#Result of method Cake\\Http\\Response::send\(\) \(void\) is used#'
+        - '#Method Cake\\View\\Form\\ContextInterface::val\(\) invoked with 2 parameters, 1 required#'
     earlyTerminatingMethodCalls:
         Cake\Shell\Shell:
             - abort