diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index fb423ed92d2..77cd63e5ea0 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015-2025 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f08d497922d..a3b0e6c7aca 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9385,8 +9385,10 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' * @return string Translated string for the key */ function ($m) { - return '__BRACKETSTART' . $m[1] . 'BRACKETEND__'; }, - $out); + return '__BRACKETSTART' . $m[1] . 'BRACKETEND__'; + }, + $out + ); $dom->loadHTML($out, LIBXML_HTML_NODEFDTD | LIBXML_ERR_NONE | LIBXML_HTML_NOIMPLIED | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_NOERROR | LIBXML_NOXMLDECL); @@ -9402,8 +9404,10 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' * @return string Translated string for the key */ function ($m) { - return '__[' . $m[1] . ']__'; }, - $out); + return '__[' . $m[1] . ']__'; + }, + $out + ); // Remove the trick added to solve pb with text in utf8 and text without parent tag //$out = preg_replace('/^'.preg_quote('', '/').'/', '', $out); @@ -10970,12 +10974,12 @@ function print_date_range($date_start, $date_end, $format = '', $outputlangs = n /** * Format output for start and end date * - * @param int $date_start Start date - * @param int $date_end End date - * @param string $format Output date format ('day', 'dayhour', ...) - * @param Translate|null $outputlangs Output language - * @param integer $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis - * @return string String + * @param int $date_start Start date + * @param int $date_end End date + * @param string $format Output date format ('day', 'dayhour', ...) + * @param ?Translate $outputlangs Output language + * @param int<0,2> $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis + * @return string String */ function get_date_range($date_start, $date_end, $format = '', $outputlangs = null, $withparenthesis = 1) { diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 0eb23d9bfc2..2775ebdcdfd 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007 Patrick Raguin * Copyright (C) 2009 Regis Houssin * Copyright (C) 2008-2013 Laurent Destailleur - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -244,14 +244,12 @@ class MenuManager // Start a new ul level 1 $level = 1; - // @phan-suppress-next-line PhanParamSuspiciousOrder - print str_pad('', $level).''."\n"; // end ul level 1 + print str_repeat(' ', $level - 1).''."\n"; // end ul level 1 } elseif ($val['enabled'] == 2) { print '
  • '; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index a0ee8ce41b1..00bba6c0239 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2009 Regis Houssin - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -246,14 +246,12 @@ class MenuManager // Start a new ul level 1 $level = 1; - // @phan-suppress-next-line PhanParamSuspiciousOrder - print str_pad('', $level).''."\n"; // end ul level 1 + print str_repeat(' ', $level - 1).'
  • '."\n"; // end ul level 1 } elseif ($val['enabled'] == 2) { print '
  • '; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 44dd126b498..228bf211b96 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2356,11 +2356,11 @@ class ExpenseReport extends CommonObject * deleteline * * @param int $rowid Row id - * @param User|string $fuser User + * @param ?User $fuser User * @param int<0,1> $notrigger 1=No trigger * @return int<-1,1> Return integer <0 if KO, >0 if OK */ - public function deleteLine($rowid, $fuser = '', $notrigger = 0) + public function deleteLine($rowid, $fuser = null, $notrigger = 0) { $error = 0;