Qual: (v22)Change field name to let phan warn about argument order (#36263)

* FIX wrong $param parameter position

* FIX ok it's good ! ;-)

* Qual: Change field name to let phan warn about argument order

# Qual: Change field name to let phan warn about argument order

Most of the time print_liste_field_titre() is called with $param instead of $moreparam.
By changing the argument name, phan will warn if the position is likely incorrect when '$param' is used - it will not warn for cases where $option or another
name is used.

---------

Co-authored-by: Regis Houssin <regis.houssin@inodbox.com>
This commit is contained in:
MDW
2025-11-17 21:49:31 +01:00
committed by GitHub
parent 309c2eff93
commit f5d6533c5b

View File

@@ -6504,7 +6504,7 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages =
* @param string $file Url used when we click on sort picto
* @param string $field Field to use for new sorting
* @param string $begin ("" by default)
* @param string $moreparam Add more parameters on sort url links ("" by default)
* @param string $param Add more parameters on sort url links ("" by default)
* @param string $moreattrib Options of attribute td ("" by default)
* @param ?string $sortfield Current field used to sort
* @param ?string $sortorder Current sort order
@@ -6513,9 +6513,9 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages =
* @param int $forcenowrapcolumntitle No need for use 'wrapcolumntitle' css style
* @return void
*/
function print_liste_field_titre($name, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $tooltip = "", $forcenowrapcolumntitle = 0)
function print_liste_field_titre($name, $file = "", $field = "", $begin = "", $param = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $tooltip = "", $forcenowrapcolumntitle = 0)
{
print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $moreattrib, $sortfield, $sortorder, $prefix, 0, $tooltip, $forcenowrapcolumntitle);
print getTitleFieldOfList($name, 0, $file, $field, $begin, $param, $moreattrib, $sortfield, $sortorder, $prefix, 0, $tooltip, $forcenowrapcolumntitle);
}
/**