From 67110625c7dbe8a7006d3dc0e48c17d0979974f3 Mon Sep 17 00:00:00 2001 From: Michael Moll Date: Sun, 22 Apr 2018 21:45:13 +0200 Subject: [PATCH] add phan --- .phan/config.php | 41 +++++++++++++++++++++++++++++++++++++++++ .travis.yml | 3 +++ 2 files changed, 44 insertions(+) create mode 100644 .phan/config.php diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 0000000..0a992f7 --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,41 @@ + null, + + // A list of directories that should be parsed for class and + // method information. After excluding the directories + // defined in exclude_analysis_directory_list, the remaining + // files will be statically analyzed for errors. + // + // Thus, both first-party and third-party code being used by + // your application should be included in this list. + 'directory_list' => [ + 'MO4', + 'tests', + ], + + // A directory list that defines files that will be excluded + // from static analysis, but whose class and method + // information should be included. + // + // Generally, you'll want to include the directories for + // third-party code (such as "vendor/") in this list. + // + // n.b.: If you'd like to parse but not analyze 3rd + // party code, directories containing that code + // should be added to both the `directory_list` + // and `exclude_analysis_directory_list` arrays. + "exclude_analysis_directory_list" => [ + 'vendor/' + ], +]; diff --git a/.travis.yml b/.travis.yml index 5cf6127..9fd907d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,9 @@ script: composer require phpstan/phpstan --dev composer require phpstan/phpstan-strict-rules --dev vendor/bin/phpstan analyse --level=max --no-progress -c .phpstan.neon MO4 tests + pecl install -f ast-0.1.6 + composer require phan/phan --dev + vendor/bin/phan -i fi - php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml