From b57495f74514ea7302cbf0c17d2aed34aec78f87 Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 22 Nov 2025 19:49:22 +0100 Subject: [PATCH] Qual: Update phan baseline (#36362) * Qual: Update Phan baseline # Qual: Update Phan baseline - Updated Phan baseline to reflect reduced occurrences of PhanTypeMismatchProperty and PhanUndeclaredMethod - Fixed syntax error in card.php by adding missing closing parenthesis * Qual: Fix PhanPluginRedundantReturnComment # Qual: Fix PhanPluginRedundantReturnComment - Add return type description for the getmsg method. --- dev/tools/phan/baseline.txt | 6 ++---- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 5b57fb43344..80342faec76 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -10,13 +10,13 @@ return [ // # Issue statistics: // PhanUndeclaredProperty : 420+ occurrences - // PhanTypeMismatchProperty : 100+ occurrences + // PhanTypeMismatchProperty : 95+ occurrences // PhanTypeMismatchArgument : 65+ occurrences // PhanUndeclaredGlobalVariable : 60+ occurrences // PhanTypeMismatchArgumentNullable : 20+ occurrences // PhanTypeInvalidDimOffset : 15+ occurrences // PhanTypeMismatchDimFetch : 10+ occurrences - // PhanUndeclaredMethod : 7 occurrences + // PhanUndeclaredMethod : 6 occurrences // PhanTypeArraySuspiciousNull : 5 occurrences // PhanTypeExpectedObjectPropAccess : 5 occurrences // PhanPluginDuplicateArrayKey : 4 occurrences @@ -253,11 +253,9 @@ return [ 'htdocs/user/class/usergroup.class.php' => ['PhanUndeclaredProperty'], 'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/viewimage.php' => ['PhanUndeclaredMethod'], 'htdocs/webhook/class/target.class.php' => ['PhanUndeclaredMethod'], 'htdocs/webhook/target_card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/webportal/admin/setup.php' => ['PhanTypeMismatchArgument'], - 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanUndeclaredProperty'], 'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'], 'htdocs/webservices/server_project.php' => ['PhanUndeclaredProperty'], diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 0fd259ecda0..9c4368b286a 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -3768,7 +3768,7 @@ class EmailCollector extends CommonObject * @param IMAP\Connection|resource $mbox Structure * @param int $mid Message Id / Message Number Email * @param string $destdir Target dir for attachments. Leave blank to parse without writing to disk. - * @return int + * @return -1|1 Return -1 if error, 1 if OK */ private function getmsg($mbox, $mid, $destdir = ''): int {