diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index fde50455f74..cfc9045aae1 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -993,7 +993,7 @@ function defaultvalues_prepare_head() /** * Return list of session * - * @return array Array list of sessions + * @return array Array list of sessions */ function listOfSessions() { @@ -1102,7 +1102,7 @@ function purgeSessions($mysessionid) * @param string $value Name of module to activate * @param int $withdeps Activate/Disable also all dependencies * @param int $noconfverification Remove verification of $conf variable for module - * @return array array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added); + * @return array{nbmodules?:int,errors:string[],nbperms?:int} array('nbmodules'=>nb modules activated with success, 'errors=>array of error messages, 'nbperms'=>Nb permission added); */ function activateModule($value, $withdeps = 1, $noconfverification = 0) { @@ -1112,7 +1112,7 @@ function activateModule($value, $withdeps = 1, $noconfverification = 0) // Check parameters if (empty($value)) { - $ret['errors'][] = 'ErrorBadParameter'; + $ret['errors'] = array('ErrorBadParameter'); return $ret; } @@ -1553,7 +1553,7 @@ function activateModulesRequiredByCountry($country_code) /** * Search external modules to complete the list of contact element * - * @param array $elementList elementList + * @param array $elementList elementList * @return int 1 */ function complete_elementList_with_modules(&$elementList) @@ -1656,14 +1656,14 @@ function complete_elementList_with_modules(&$elementList) /** * Show array with constants to edit * - * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) - * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... - * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all, 3=No form nor button at all and each field has a unique name (form is output by caller, recommended) + * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) + * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... + * @param int<2,3> $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all, 3=No form nor button at all and each field has a unique name (form is output by caller, recommended) (typed as int<2,3> to highlight the deprecated values) * @param string $helptext Tooltip help to use for the column name of values * @param string $text Text to use for the column name of values * @return void */ -function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Value') +function form_constantes($tableau, $strictw3c = 2, $helptext = '', $text = 'Value') { global $db, $langs, $conf, $user; global $_Avery_Labels; @@ -1866,8 +1866,8 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Valu /** * Show array with constants to edit * - * @param array $modules Array of all modules - * @return string HTML string with warning + * @param DolibarrModules[] $modules Array of all modules + * @return string HTML string with warning */ function showModulesExludedForExternal($modules) {