From a09519ce4143d896f4d273e42c5255eb0785580e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Jun 2026 23:47:52 +0200 Subject: [PATCH] Fix phan --- dev/tools/phan/config.php | 1 + dev/tools/phan/config_extended.php | 1 + 2 files changed, 2 insertions(+) diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 0f18ef3c9e4..dc57d9edf3c 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -487,6 +487,7 @@ return [ 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition + 'PhanPluginEmptyStatementIf', // Usually done on purpose with a comment 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences // 'PhanTypeMismatchArgument', // Can detect missing array keys, invalid types, objects being passed when scalar expected - Not all reported by phpstan - <=3800 cases (was: 12300+ before) diff --git a/dev/tools/phan/config_extended.php b/dev/tools/phan/config_extended.php index c9a4168d675..d3833c84929 100644 --- a/dev/tools/phan/config_extended.php +++ b/dev/tools/phan/config_extended.php @@ -87,6 +87,7 @@ $config['suppress_issue_types'] = [ 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition + 'PhanPluginEmptyStatementIf', // Usually done on purpose with a comment 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences // 'PhanTypeMismatchArgument', // Most fixed ~120 occurrences (was: 12300+ before)