From bb6cf2c6ed2875a3695f7cfd2f15a2e8cf547cb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Mar 2024 23:00:55 +0100 Subject: [PATCH] Fix warning --- dev/tools/phan/config.php | 1 + dev/tools/phan/config_extended.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 085d4daba12..178a021e00c 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -331,6 +331,7 @@ return [ // Dolibarr uses a lot of internal deprecated stuff, not reporting 'PhanDeprecatedProperty', 'PhanDeprecatedFunction', + 'PhanCompatibleNegativeStringOffset', // Dolibarr has quite a few strange noop assignments like $abc=$abc; 'PhanPluginDuplicateExpressionAssignment', // Nulls are likely mostly false positives diff --git a/dev/tools/phan/config_extended.php b/dev/tools/phan/config_extended.php index a186b90bd25..65dcc8f7389 100644 --- a/dev/tools/phan/config_extended.php +++ b/dev/tools/phan/config_extended.php @@ -326,6 +326,8 @@ return [ // Add any issue types (such as 'PhanUndeclaredMethod') // here to inhibit them from being reported 'suppress_issue_types' => [ + 'PhanCompatibleNegativeStringOffset', // return false positive + 'PhanPluginWhitespaceTab', // Dolibarr used tabs 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility 'PhanPluginShortArray', // Dolibarr uses array() @@ -335,6 +337,7 @@ return [ 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition + 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences 'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences