From 9d61b20ecd6f8cb3aab178f70b5f4e466af69d2a Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Tue, 18 Feb 2025 10:24:00 +0100 Subject: [PATCH] Fix php stan --- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/core/class/timespent.class.php | 2 +- htdocs/core/lib/company.lib.php | 18 ++++++++---------- htdocs/website/index.php | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index b18bcac8aca..ec83f271881 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -119,7 +119,7 @@ class Commande extends CommonOrder /** * Status of the order - * @var int + * @var int|null */ public $status; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 494d9cff49c..7e89a2a2217 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -104,7 +104,7 @@ class Facture extends CommonInvoice protected $table_ref_field = 'ref'; /** - * @var int ID + * @var int|null ID * @deprecated Use $user_creation_id */ public $fk_user_author; diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index fdd8dd83bcd..e5f10fb3c8b 100644 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -184,7 +184,7 @@ class TimeSpent extends CommonObject */ public $intervention_line_id; /** - * @var string + * @var int */ public $datec; /** diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index eb1b72a3846..c91193ac55e 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -2037,7 +2037,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr // Complete request and execute it with limit $sql .= $db->order($sortfield_new, $sortorder); - if ($limit) { + if ($limit) { // @phpstan-ignore-line $sql .= $db->plimit($limit + 1, $offset); } @@ -2684,16 +2684,14 @@ function htmlPrintOnlineHeader($mysoc, $langs) print '
'; // Output html code for logo - if ($urllogo) { - print '
'; - print '
'; - print ''; - print '
'; - if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) { - print ''; - } - print '
'; + print '
'; + print '
'; + print ''; + print '
'; + if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) { + print ''; } + print '
'; if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) { print '
'; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index b3880b31f81..5e376b7dafe 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4442,7 +4442,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties $pagelang = GETPOST('WEBSITE_LANG', 'aZ09'); } if (GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09')) { - $pageallowedinframes = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; + $pageallowedinframes = 1; } if (GETPOST('htmlheader', 'none')) { // Must accept tags like '