From 24e7285539c6dc49bfcc03d553d15bd7070d2946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2024 15:33:09 +0100 Subject: [PATCH] fix CI (#31692) * Update commonobjectline.class.php * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: Laurent Destailleur --- htdocs/compta/resultat/clientfourn.php | 2 +- htdocs/core/class/commonobjectline.class.php | 8 ++++---- htdocs/core/class/discount.class.php | 2 +- htdocs/cron/class/cronjob.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 77adb2a2bc7b8..7885424ffe42c 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Dourseanud + * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2014-2106 Ferran Marcet * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 9be90a220c931..484ead2770da3 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -354,12 +354,12 @@ public function getNomUrl($withpicto = 0) $parent_element_properties = getElementProperties($this->parent_element); $parent_classname = $parent_element_properties['classname']; $parent_element = new $parent_classname($this->db); + /** @var CommonObject $parent_element */ + $parentattribute = $this->fk_parent_attribute; if ($parentattribute && method_exists($parent_element, 'fetch')) { - // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall - $parent_element->fetch($this->$parentattribute); /* @phpstan-ignore-line */ + $parent_element->fetch($this->$parentattribute); // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall } - // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall - return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id; /* @phpstan-ignore-line */ + return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id; // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall } } diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 3b267092dd0a6..7d90b55bfade3 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -778,7 +778,7 @@ public function getSumFromThisCreditNotesNotUsed($invoice, $multicurrency = 0) * @param string $option Where to link to ('invoice' or 'discount') * @return string String with URL */ - public function getNomUrl($withpicto, $option = 'invoice') + public function getNomUrl($withpicto = 0, $option = 'invoice') { global $langs; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 3960be82f19f8..d3dfb5f6b9206 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1043,7 +1043,7 @@ public function getTooltipContentArray($params) * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - public function getNomUrl(int $withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1) { global $conf, $langs; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index ecab83d92deef..17f9057f5a910 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -923,7 +923,7 @@ public function getTooltipContentArray($params) * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - public function getNomUrl(int $withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1) { global $langs, $hookmanager, $action;