Improve phpdoc typing

This commit is contained in:
MDW
2024-03-26 01:14:55 +01:00
parent a703ea1092
commit a30bf48e16

View File

@@ -642,8 +642,8 @@ function GETPOSTISSET($paramname)
* Return true if the parameter $paramname is submit from a POST OR GET as an array.
* Can be used before GETPOST to know if the $check param of GETPOST need to check an array or a string
*
* @param string $paramname Name or parameter to test
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
* @param string $paramname Name or parameter to test
* @param int<0,3> $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
* @return bool True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
*/
function GETPOSTISARRAY($paramname, $method = 0)
@@ -1011,9 +1011,9 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
* Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
* Note: The property $user->default_values is loaded by main.php when loading the user.
*
* @param string $paramname Name of the $_GET or $_POST parameter
* @param int $method Type of method (0 = $_GET then $_POST, 1 = only $_GET, 2 = only $_POST, 3 = $_POST then $_GET)
* @return int Value converted into integer
* @param string $paramname Name of the $_GET or $_POST parameter
* @param int<0,3> $method Type of method (0 = $_GET then $_POST, 1 = only $_GET, 2 = only $_POST, 3 = $_POST then $_GET)
* @return int Value converted into integer
*/
function GETPOSTINT($paramname, $method = 0)
{
@@ -1663,10 +1663,10 @@ function dol_string_nounprintableascii($str, $removetabcrlf = 1)
/**
* Returns text escaped for inclusion into javascript code
*
* @param string $stringtoescape String to escape
* @param int $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
* @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
* @param string $stringtoescape String to escape
* @param int<0,3> $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
* @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
*/
function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0)
{
@@ -2420,7 +2420,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
/**
* Show tab footer of a card
*
* @param int $notab -1 or 0=Add tab footer, 1=no tab footer
* @param int<-1,1> $notab -1 or 0=Add tab footer, 1=no tab footer
* @return void
* @deprecated Use print dol_get_fiche_end() instead
*/
@@ -2432,7 +2432,7 @@ function dol_fiche_end($notab = 0)
/**
* Return tab footer of a card
*
* @param int $notab -1 or 0=Add tab footer, 1=no tab footer
* @param int<-1,1> $notab -1 or 0=Add tab footer, 1=no tab footer
* @return string
*/
function dol_get_fiche_end($notab = 0)