|
| 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 | +use Phan\Issue; |
| 9 | + |
| 10 | +return [ |
| 11 | + |
| 12 | + // If true, missing properties will be created when |
| 13 | + // they are first seen. If false, we'll report an |
| 14 | + // error message. |
| 15 | + "allow_missing_properties" => false, |
| 16 | + // Allow null to be cast as any type and for any |
| 17 | + // type to be cast to null. |
| 18 | + "null_casts_as_any_type" => false, |
| 19 | + // If enabled, scalars (int, float, bool, string, null) |
| 20 | + // are treated as if they can cast to each other. |
| 21 | + 'scalar_implicit_cast' => false, |
| 22 | + // If true, seemingly undeclared variables in the global |
| 23 | + // scope will be ignored. This is useful for projects |
| 24 | + // with complicated cross-file globals that you have no |
| 25 | + // hope of fixing. |
| 26 | + 'ignore_undeclared_variables_in_global_scope' => false, |
| 27 | + // Backwards Compatibility Checking |
| 28 | + 'backward_compatibility_checks' => false, |
| 29 | + // If enabled, check all methods that override a |
| 30 | + // parent method to make sure its signature is |
| 31 | + // compatible with the parent's. This check |
| 32 | + // can add quite a bit of time to the analysis. |
| 33 | + 'analyze_signature_compatibility' => true, |
| 34 | + // Set to true in order to attempt to detect dead |
| 35 | + // (unreferenced) code. Keep in mind that the |
| 36 | + // results will only be a guess given that classes, |
| 37 | + // properties, constants and methods can be referenced |
| 38 | + // as variables (like `$class->$property` or |
| 39 | + // `$class->$method()`) in ways that we're unable |
| 40 | + // to make sense of. |
| 41 | + 'dead_code_detection' => false, |
| 42 | + // Run a quick version of checks that takes less |
| 43 | + // time |
| 44 | + "quick_mode" => false, |
| 45 | + // Enable or disable support for generic templated |
| 46 | + // class types. |
| 47 | + 'generic_types_enabled' => true, |
| 48 | + // By default, Phan will not analyze all node types |
| 49 | + // in order to save time. If this config is set to true, |
| 50 | + // Phan will dig deeper into the AST tree and do an |
| 51 | + // analysis on all nodes, possibly finding more issues. |
| 52 | + // |
| 53 | + // See \Phan\Analysis::shouldVisit for the set of skipped |
| 54 | + // nodes. |
| 55 | + 'should_visit_all_nodes' => true, |
| 56 | + // Override if runkit.superglobal ini directive is used. |
| 57 | + // See Phan\Config. |
| 58 | + 'runkit_superglobals' => [], |
| 59 | + // Override to hardcode existence and types of (non-builtin) globals. |
| 60 | + // Class names must be prefixed with '\\'. |
| 61 | + 'globals_type_map' => [], |
| 62 | + // The minimum severity level to report on. This can be |
| 63 | + // set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or |
| 64 | + // Issue::SEVERITY_CRITICAL. |
| 65 | + 'minimum_severity' => Issue::SEVERITY_LOW, |
| 66 | + |
| 67 | + // A list of directories that should be parsed for class and |
| 68 | + // method information. After excluding the directories |
| 69 | + // defined in exclude_analysis_directory_list, the remaining |
| 70 | + // files will be statically analyzed for errors. |
| 71 | + // |
| 72 | + // Thus, both first-party and third-party code being used by |
| 73 | + // your application should be included in this list. |
| 74 | + 'directory_list' => [ |
| 75 | + 'src', |
| 76 | + 'vendor' |
| 77 | + ], |
| 78 | + |
| 79 | + // A directory list that defines files that will be excluded |
| 80 | + // from static analysis, but whose class and method |
| 81 | + // information should be included. |
| 82 | + // |
| 83 | + // Generally, you'll want to include the directories for |
| 84 | + // third-party code (such as "vendor/") in this list. |
| 85 | + // |
| 86 | + // n.b.: If you'd like to parse but not analyze 3rd |
| 87 | + // party code, directories containing that code |
| 88 | + // should be added to both the `directory_list` |
| 89 | + // and `exclude_analysis_directory_list` arrays. |
| 90 | + "exclude_analysis_directory_list" => [ |
| 91 | + 'vendor/' |
| 92 | + ], |
| 93 | +]; |
0 commit comments