From cd5df0bd680de5f0ac8650824cf3c45a6ccfe12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 21 Aug 2025 23:13:00 +0200 Subject: [PATCH] try to fix doc (#35036) * try to fix doc * try to fix doc * try to fix doc * try to fix doc * try to fix doc * try to fix doc * try to fix doc * try to fix doc * try to fix doc --- dev/build/phpstan/phpstan-baseline.neon | 30 ------------------------- htdocs/core/class/CMailFile.class.php | 6 ++--- htdocs/core/lib/ajax.lib.php | 16 ++++++------- 3 files changed, 11 insertions(+), 41 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 98d1fd36fa9..65e14fc4d63 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -6810,18 +6810,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/CMailFile.class.php - - - message: '#^Method CMailFile\:\:getValidAddress\(\) has parameter \$encode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - - - message: '#^Method CMailFile\:\:getValidAddress\(\) has parameter \$maxnumberofemail with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - message: '#^Property CMailFile\:\:\$addr_bcc \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -8730,24 +8718,6 @@ parameters: count: 2 path: ../../../htdocs/core/lib/agenda.lib.php - - - message: '#^Function ajax_constantonoff\(\) has parameter \$entity with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - - - message: '#^Function ajax_constantonoff\(\) has parameter \$revertonoff with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - - - message: '#^Function ajax_constantonoff\(\) has parameter \$strict with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index f22f22dd12c..0855d8eb656 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -2218,9 +2218,9 @@ class CMailFile * Return a formatted address string for SMTP protocol * * @param string $address Example: 'John Doe , Alan Smith ' or 'john@doe.com, alan@smith.com' - * @param int $format 0=auto, 1=emails with <>, 2=emails without <>, 3=auto + label between ", 4 label or email, 5 mailto link - * @param int $encode 0=No encode name, 1=Encode name to RFC2822 - * @param int $maxnumberofemail 0=No limit. Otherwise, maximum number of emails returned ($address may contains several email separated with ','). Add '...' if there is more. + * @param int $format Set to 0 = auto, 1 = emails with <>, 2 = emails without <>, 3 = auto + label between "", 4 label or email, 5 mailto link + * @param int $encode Set to 0 = No encode name, 1 = Encode name to RFC2822 + * @param int $maxnumberofemail Set to 0 = No limit. Otherwise, maximum number of emails returned ($address may contains several email separated with ','). Add '...' if there is more. * @return string If format 0: '' or 'John Doe ' or '=?UTF-8?B?Sm9obiBEb2U=?= ' * If format 1: '' * If format 2: 'john@doe.com' diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 266a77fd525..bee44d7bd1e 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -1,9 +1,9 @@ - * Copyright (C) 2007-2015 Regis Houssin - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2015 Regis Houssin + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -663,10 +663,10 @@ function ajax_event($htmlname, $events) * On/off button for constant * * @param string $code Name of constant - * @param array $input Array of complementary actions to do if success ("disabled"|"enabled'|'set'|'del') => CSS element to switch, 'alert' => message to show, ... Example: array('disabled'=>array(0=>'cssid')) + * @param array $input It's array of complementary actions to do if success ("disabled"|"enabled'|'set'|'del') => CSS element to switch, 'alert' => message to show, ... Example: array('disabled'=>array(0=>'cssid')) * @param ?int $entity Entity. Current entity is used if null. - * @param int<0,1> $revertonoff 1=Revert on/off - * @param int<0,1> $strict 0=Default, 1=Only the complementary actions "disabled and "enabled" (found into $input) are processed. Use only "disabled" with delConstant and "enabled" with setConstant. + * @param int<0,1> $revertonoff 1 = Revert on/off + * @param int<0,1> $strict 0 = Default, 1=Only the complementary actions "disabled and "enabled" (found into $input) are processed. Use only "disabled" with delConstant and "enabled" with setConstant. * @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input) * @param int<0,2> $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin. * @param int<0,1> $forcenoajax 1 = Force to use a ahref link instead of ajax code.