Skip to content

Commit 6711062

Browse files
mmollxalopp
authored andcommitted
add phan
1 parent 0bd4c6c commit 6711062

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.phan/config.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
/**
4+
* This configuration will be read and overlaid on top of the
5+
* default configuration. Command line arguments will be applied
6+
* after this file is read.
7+
*/
8+
return [
9+
// Supported values: '7.0', '7.1', '7.2', null.
10+
// If this is set to null,
11+
// then Phan assumes the PHP version which is closest to the minor version
12+
// of the php executable used to execute phan.
13+
'target_php_version' => null,
14+
15+
// A list of directories that should be parsed for class and
16+
// method information. After excluding the directories
17+
// defined in exclude_analysis_directory_list, the remaining
18+
// files will be statically analyzed for errors.
19+
//
20+
// Thus, both first-party and third-party code being used by
21+
// your application should be included in this list.
22+
'directory_list' => [
23+
'MO4',
24+
'tests',
25+
],
26+
27+
// A directory list that defines files that will be excluded
28+
// from static analysis, but whose class and method
29+
// information should be included.
30+
//
31+
// Generally, you'll want to include the directories for
32+
// third-party code (such as "vendor/") in this list.
33+
//
34+
// n.b.: If you'd like to parse but not analyze 3rd
35+
// party code, directories containing that code
36+
// should be added to both the `directory_list`
37+
// and `exclude_analysis_directory_list` arrays.
38+
"exclude_analysis_directory_list" => [
39+
'vendor/'
40+
],
41+
];

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ script:
1818
composer require phpstan/phpstan --dev
1919
composer require phpstan/phpstan-strict-rules --dev
2020
vendor/bin/phpstan analyse --level=max --no-progress -c .phpstan.neon MO4 tests
21+
pecl install -f ast-0.1.6
22+
composer require phan/phan --dev
23+
vendor/bin/phan -i
2124
fi
2225
- php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml
2326

0 commit comments

Comments
 (0)