diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 8c6712b16bd..84f617721b4 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -12,11 +12,11 @@ return [ // PhanUndeclaredProperty : 420+ occurrences // PhanTypeMismatchProperty : 100+ occurrences // PhanTypeMismatchArgument : 70+ occurrences - // PhanUndeclaredGlobalVariable : 65+ occurrences + // PhanUndeclaredGlobalVariable : 60+ occurrences // PhanTypeMismatchArgumentNullable : 40+ occurrences // PhanTypeInvalidDimOffset : 15+ occurrences // PhanTypeMismatchDimFetch : 15+ occurrences - // PhanUndeclaredMethod : 9 occurrences + // PhanUndeclaredMethod : 8 occurrences // PhanPossiblyUndeclaredGlobalVariable : 6 occurrences // PhanTypeArraySuspiciousNull : 6 occurrences // PhanTypeComparisonFromArray : 6 occurrences @@ -31,7 +31,6 @@ return [ // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'], 'htdocs/comm/action/index.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'], @@ -157,10 +156,7 @@ return [ 'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'], 'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'], 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'], - 'htdocs/don/document.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/don/info.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/don/list.php' => ['PhanTypeMismatchProperty'], - 'htdocs/don/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'], 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgument'], @@ -217,7 +213,7 @@ return [ 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/product/stock/info.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/list.php' => ['PhanUndeclaredProperty'], - 'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredProperty'], 'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stats/expedition.php' => ['PhanUndeclaredProperty'], diff --git a/htdocs/webportal/controllers/shareddocuments.controller.class.php b/htdocs/webportal/controllers/shareddocuments.controller.class.php index b4cc1979d25..068289ff6cb 100644 --- a/htdocs/webportal/controllers/shareddocuments.controller.class.php +++ b/htdocs/webportal/controllers/shareddocuments.controller.class.php @@ -2,6 +2,7 @@ /* * Copyright (C) 2024 Frédéric France * Copyright (c) 2025 Schaffhauser sébastien + * Copyright (C) 2025 MDW * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation. @@ -127,12 +128,18 @@ class SharedDocumentsController extends AbstractDocumentController // 5. Define functions to build navigation and download links $linkBuilder = array( - 'dir' => /** @param array $dir */ + 'dir' => /** + * @param array $dir + * @return string + */ function (array $dir) use ($baseUrl, $sanitized_subdir) { $new_subdir = (!empty($sanitized_subdir) ? $sanitized_subdir . '/' : '') . $dir['name']; return $baseUrl . '&subdir=' . urlencode($new_subdir); }, - 'file' => /** @param array $file */ + 'file' => /** + * @param array $file + * @return string + */ function (array $file) use ($shared_dir_name, $sanitized_subdir) { $file_path = $shared_dir_name . '/' . (!empty($sanitized_subdir) ? $sanitized_subdir . '/' : '') . $file['name']; return DOL_URL_ROOT . '/document.php?modulepart=ecm&file=' . urlencode($file_path);