Qual: Update phan baseline, set return value for anonymous functions (#35775)

* Qual: Update baseline regarding fixed phan notices

# Qual: Update baseline regarding fixed phan notices

* Qual: Fix phan notice (return type of anonymous function

# Qual: Fix phan notice (return type of anonymous function
This commit is contained in:
MDW
2025-10-17 01:57:37 +02:00
committed by GitHub
parent 174a38b48b
commit fa266e7fd7
2 changed files with 12 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
/*
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (c) 2025 Schaffhauser sébastien <sebastien@webmaster67.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* 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<string, mixed> $dir */
'dir' => /**
* @param array<string, mixed> $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<string, mixed> $file */
'file' => /**
* @param array<string, mixed> $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);