- /**
- * Set to true in order to attempt to detect dead
- * (unreferenced) code. Keep in mind that the
- * results will only be a guess given that classes,
- * properties, constants and methods can be referenced
- * as variables (like `$class->$property` or
- * `$class->$method()`) in ways that we're unable
- * to make sense of.
- */
- 'dead_code_detection' => false,
-
- /**
- * If true, the dead code detection rig will
- * prefer false negatives (not report dead code) to
- * false positives (report dead code that is not
- * actually dead) which is to say that the graph of
- * references will create too many edges rather than
- * too few edges when guesses have to be made about
- * what references what.
- */
- 'dead_code_detection_prefer_false_negative' => true,
-
- /**
- * If disabled, Phan will not read docblock type
- * annotation comments (such as for @return, @param,
- * @var, @suppress, @deprecated) and only rely on
- * types expressed in code.
- */
- 'read_type_annotations' => true,
-
- /**
- * If a file path is given, the code base will be
- * read from and written to the given location in
- * order to attempt to save some work from being
- * done. Only changed files will get analyzed if
- * the file is read
- */
- 'stored_state_file_path' => null,
-
- /**
- * Set to true in order to ignore issue suppression.
- * This is useful for testing the state of your code, but
- * unlikely to be useful outside of that.
- */
- 'disable_suppression' => false,
-
- /**
- * If set to true, we'll dump the AST instead of
- * analyzing files
- */
- 'dump_ast' => false,
-
- /**
- * If set to a string, we'll dump the fully qualified lowercase
- * function and method signatures instead of analyzing files.
- */
- 'dump_signatures_file' => null,
-
- /**
- * If true (and if stored_state_file_path is set) we'll
- * look at the list of files passed in and expand the list
- * to include files that depend on the given files
- */
- 'expand_file_list' => false,
-
- // Include a progress bar in the output
- 'progress_bar' => false,
-
- /**
- * The probability of actually emitting any progress
- * bar update. Setting this to something very low
- * is good for reducing network IO and filling up
- * your terminal's buffer when running phan on a
- * remote host.
- */
- 'progress_bar_sample_rate' => 0.005,
-
- /**
- * The number of processes to fork off during the analysis
- * phase.
- */
- 'processes' => 1,
-
- /**
- * Add any issue types (such as 'PhanUndeclaredMethod')
- * to this black-list to inhibit them from being reported.
- */
- 'suppress_issue_types' => [
- // approximate error count: 29
- "PhanCommentParamOnEmptyParamList",
- // approximate error count: 33
- "PhanCommentParamWithoutRealParam",
- // approximate error count: 8
- "PhanDeprecatedClass",
- // approximate error count: 415
- "PhanDeprecatedFunction",
- // approximate error count: 25
- "PhanDeprecatedProperty",
- // approximate error count: 17
- "PhanNonClassMethodCall",
- // approximate error count: 888
- "PhanParamSignatureMismatch",
- // approximate error count: 7
- "PhanParamSignatureMismatchInternal",
- // approximate error count: 1
- "PhanParamSignatureRealMismatchTooFewParameters",
- // approximate error count: 125
- "PhanParamTooMany",
- // approximate error count: 3
- "PhanParamTooManyInternal",
- // approximate error count: 1
- "PhanRedefineFunctionInternal",
- // approximate error count: 2
- "PhanTraitParentReference",
- // approximate error count: 3
- "PhanTypeComparisonFromArray",
- // approximate error count: 2
- "PhanTypeComparisonToArray",
- // approximate error count: 218
- "PhanTypeMismatchArgument",
- // approximate error count: 13
- "PhanTypeMismatchArgumentInternal",
- // approximate error count: 5
- "PhanTypeMismatchDimAssignment",
- // approximate error count: 2
- "PhanTypeMismatchDimEmpty",
- // approximate error count: 1
- "PhanTypeMismatchDimFetch",
- // approximate error count: 14
- "PhanTypeMismatchForeach",
- // approximate error count: 56
- "PhanTypeMismatchProperty",
- // approximate error count: 74
- "PhanTypeMismatchReturn",
- // approximate error count: 5
- "PhanTypeNonVarPassByRef",
- // approximate error count: 32
- "PhanUndeclaredConstant",
- // approximate error count: 233
- "PhanUndeclaredMethod",
- // approximate error count: 1224
- "PhanUndeclaredProperty",
- // approximate error count: 58
- "PhanUndeclaredVariableDim",
- ],
-
- /**
- * If empty, no filter against issues types will be applied.
- * If this white-list is non-empty, only issues within the list
- * will be emitted by Phan.
- */
- 'whitelist_issue_types' => [
- // 'PhanAccessMethodPrivate',
- // 'PhanAccessMethodProtected',
- // 'PhanAccessNonStaticToStatic',
- // 'PhanAccessPropertyPrivate',
- // 'PhanAccessPropertyProtected',
- // 'PhanAccessSignatureMismatch',
- // 'PhanAccessSignatureMismatchInternal',
- // 'PhanAccessStaticToNonStatic',
- // 'PhanCompatibleExpressionPHP7',
- // 'PhanCompatiblePHP7',
- // 'PhanContextNotObject',
- // 'PhanDeprecatedClass',
- // 'PhanDeprecatedFunction',
- // 'PhanDeprecatedProperty',
- // 'PhanEmptyFile',
- // 'PhanNonClassMethodCall',
- // 'PhanNoopArray',
- // 'PhanNoopClosure',
- // 'PhanNoopConstant',
- // 'PhanNoopProperty',
- // 'PhanNoopVariable',
- // 'PhanParamRedefined',
- // 'PhanParamReqAfterOpt',
- // 'PhanParamSignatureMismatch',
- // 'PhanParamSignatureMismatchInternal',
- // 'PhanParamSpecial1',
- // 'PhanParamSpecial2',
- // 'PhanParamSpecial3',
- // 'PhanParamSpecial4',
- // 'PhanParamTooFew',
- // 'PhanParamTooFewInternal',
- // 'PhanParamTooMany',
- // 'PhanParamTooManyInternal',
- // 'PhanParamTypeMismatch',
- // 'PhanParentlessClass',
- // 'PhanRedefineClass',
- // 'PhanRedefineClassInternal',
- // 'PhanRedefineFunction',
- // 'PhanRedefineFunctionInternal',
- // 'PhanStaticCallToNonStatic',
- // 'PhanSyntaxError',
- // 'PhanTraitParentReference',
- // 'PhanTypeArrayOperator',
- // 'PhanTypeArraySuspicious',
- // 'PhanTypeComparisonFromArray',
- // 'PhanTypeComparisonToArray',
- // 'PhanTypeConversionFromArray',
- // 'PhanTypeInstantiateAbstract',
- // 'PhanTypeInstantiateInterface',
- // 'PhanTypeInvalidLeftOperand',
- // 'PhanTypeInvalidRightOperand',
- // 'PhanTypeMismatchArgument',
- // 'PhanTypeMismatchArgumentInternal',
- // 'PhanTypeMismatchDefault',
- // 'PhanTypeMismatchForeach',
- // 'PhanTypeMismatchProperty',
- // 'PhanTypeMismatchReturn',
- // 'PhanTypeMissingReturn',
- // 'PhanTypeNonVarPassByRef',
- // 'PhanTypeParentConstructorCalled',
- // 'PhanTypeVoidAssignment',
- // 'PhanUnanalyzable',
- // 'PhanUndeclaredClass',
- // 'PhanUndeclaredClassCatch',
- // 'PhanUndeclaredClassConstant',
- // 'PhanUndeclaredClassInstanceof',
- // 'PhanUndeclaredClassMethod',
- // 'PhanUndeclaredClassReference',
- // 'PhanUndeclaredConstant',
- // 'PhanUndeclaredExtendedClass',
- // 'PhanUndeclaredFunction',
- // 'PhanUndeclaredInterface',
- // 'PhanUndeclaredMethod',
- // 'PhanUndeclaredProperty',
- // 'PhanUndeclaredStaticMethod',
- // 'PhanUndeclaredStaticProperty',
- // 'PhanUndeclaredTrait',
- // 'PhanUndeclaredTypeParameter',
- // 'PhanUndeclaredTypeProperty',
- // 'PhanUndeclaredVariable',
- // 'PhanUnreferencedClass',
- // 'PhanUnreferencedConstant',
- // 'PhanUnreferencedMethod',
- // 'PhanUnreferencedProperty',
- // 'PhanVariableUseClause',
- ],
-
- /**
- * Override to hardcode existence and types of (non-builtin) globals in the global scope.
- * Class names must be prefixed with '\\'.
- * (E.g. ['_FOO' => '\\FooClass', 'page' => '\\PageClass', 'userId' => 'int'])
- */
- 'globals_type_map' => [
- 'IP' => 'string',
- ],
-
- // Emit issue messages with markdown formatting
- 'markdown_issue_messages' => false,
-
- /**
- * Enable or disable support for generic templated
- * class types.
- */
- 'generic_types_enabled' => true,