You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.9 KiB
65 lines
1.9 KiB
3 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
return [
|
||
|
'target_php_version' => '7.4',
|
||
|
|
||
|
'directory_list' => [
|
||
|
'.phan/stubs/',
|
||
|
'src/',
|
||
|
'vendor/laravel/',
|
||
|
'vendor/composer/',
|
||
|
'vendor/symfony/'
|
||
|
],
|
||
|
|
||
|
'exclude_analysis_directory_list' => [
|
||
|
'vendor/',
|
||
|
'.phan/stubs/'
|
||
|
],
|
||
|
|
||
|
'plugins' => [
|
||
|
// stricter checks on whether a function returns the proper type
|
||
|
'AlwaysReturnPlugin',
|
||
|
// warn about trying to set duplicate keys in arrays (common mistake)
|
||
|
// warn about duplicate switch case values
|
||
|
// warn about mixing arrays/dictionaries
|
||
|
'DuplicateArrayKeyPlugin',
|
||
|
// validate regular expressions
|
||
|
'PregRegexCheckerPlugin',
|
||
|
// validate printf statements
|
||
|
'PrintfCheckerPlugin',
|
||
|
// Check for unreachable code in functions
|
||
|
'UnreachableCodePlugin',
|
||
|
// warn if you're calling a function where you probably should be using
|
||
|
// the return value (e.g., printf) but are not
|
||
|
'UseReturnValuePlugin',
|
||
|
// Infer values from phpunit tests
|
||
|
//'PHPUnitAssertionPlugin'
|
||
|
// Warn if structures are missing phpdoc plugins
|
||
|
'HasPHPDocPlugin',
|
||
|
// warn on isset(func()['index']) and isset($array[$key]) where $array is not set
|
||
|
//'InvalidVariableIssetPlugin'
|
||
|
// warn about returning non-array values from __sleep
|
||
|
'SleepCheckerPlugin',
|
||
|
// warn about unknown return/parameter type (not documented and unable to
|
||
|
// be inferred)
|
||
|
'UnknownElementTypePlugin',
|
||
|
// warn about expressions that are likely to be a bug (e.g., a == a)
|
||
|
'DuplicateExpressionPlugin',
|
||
|
// try and use some heuristics to detect if parameters are out of order
|
||
|
// on some function calls
|
||
|
//'SuspiciousParamOrderPlugin',
|
||
|
|
||
|
],
|
||
|
|
||
|
'plugin_config' => [
|
||
|
// UseReturnValuePlugin -- slow; check and see if the return value of a
|
||
|
// function is *normally* used and if so, warn where it is not.
|
||
|
//'use_return_value_dynamic_checks'=>true
|
||
|
//'use_return_value_warn_threshold_percentage'=>98,
|
||
|
],
|
||
|
|
||
|
'minimum_severity' => 0
|
||
|
];
|