|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * This configuration will be read and overlaid on top of the |
| 4 | + * default configuration. Command-line arguments will be applied |
| 5 | + * after this file is read. |
| 6 | + */ |
| 7 | +return [ |
| 8 | + // Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`, |
| 9 | + // `'7.4'`, `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 | + // |
| 14 | + // Note that the **only** effect of choosing `'5.6'` is to infer |
| 15 | + // that functions removed in php 7.0 exist. |
| 16 | + // (See `backward_compatibility_checks` for additional options) |
| 17 | + // TODO: Set this. |
| 18 | + 'target_php_version' => null, |
| 19 | + |
| 20 | + // A list of directories that should be parsed for class and |
| 21 | + // method information. After excluding the directories |
| 22 | + // defined in exclude_analysis_directory_list, the remaining |
| 23 | + // files will be statically analyzed for errors. |
| 24 | + // |
| 25 | + // Thus, both first-party and third-party code being used by |
| 26 | + // your application should be included in this list. |
| 27 | + 'directory_list' => [ |
| 28 | + 'src' |
| 29 | + ], |
| 30 | + |
| 31 | + // A regex used to match every file name that you want to |
| 32 | + // exclude from parsing. Actual value will exclude every |
| 33 | + // "test", "tests", "Test" and "Tests" folders found in |
| 34 | + // "vendor/" directory. |
| 35 | + 'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@', |
| 36 | + |
| 37 | + // A directory list that defines files that will be excluded |
| 38 | + // from static analysis, but whose class and method |
| 39 | + // information should be included. |
| 40 | + // |
| 41 | + // Generally, you'll want to include the directories for |
| 42 | + // third-party code (such as "vendor/") in this list. |
| 43 | + // |
| 44 | + // n.b.: If you'd like to parse but not analyze 3rd |
| 45 | + // party code, directories containing that code |
| 46 | + // should be added to both the `directory_list` |
| 47 | + // and `exclude_analysis_directory_list` arrays. |
| 48 | + 'exclude_analysis_directory_list' => [ |
| 49 | + 'vendor/' |
| 50 | + ], |
| 51 | + |
| 52 | + // Set to true in order to attempt to detect unused variables. |
| 53 | + // `dead_code_detection` will also enable unused variable detection. |
| 54 | + // |
| 55 | + // This has a few known false positives, e.g. for loops or branches. |
| 56 | + 'unused_variable_detection' => true, |
| 57 | + |
| 58 | + // If enabled, warn about throw statement where the exception types |
| 59 | + // are not documented in the PHPDoc of functions, methods, and closures. |
| 60 | + 'warn_about_undocumented_throw_statements' => true, |
| 61 | + |
| 62 | + // If enabled (and warn_about_undocumented_throw_statements is enabled), |
| 63 | + // warn about function/closure/method calls that have (at)throws |
| 64 | + // without the invoking method documenting that exception. |
| 65 | + 'warn_about_undocumented_exceptions_thrown_by_invoked_functions' => true, |
| 66 | + |
| 67 | + // A list of plugin files to execute |
| 68 | + // NOTE: values can be the base name without the extension for plugins bundled with Phan (E.g. 'AlwaysReturnPlugin') |
| 69 | + // or relative/absolute paths to the plugin (Relative to the project root). |
| 70 | + 'plugins' => [ |
| 71 | + 'PreferNamespaceUsePlugin', |
| 72 | + ] |
| 73 | +]; |
0 commit comments