From 37922f464f33d08ee0ef693eb17c290aeebf882b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Sep 2024 19:44:01 +0200 Subject: [PATCH] Fix phan --- htdocs/admin/invoice.php | 4 ++-- htdocs/core/modules/fichinter/modules_fichinter.php | 7 +++++++ htdocs/core/modules/holiday/modules_holiday.php | 7 +++++++ htdocs/core/modules/hrm/modules_evaluation.php | 8 ++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/invoice.php b/htdocs/admin/invoice.php index c35809945ba..72c53c740fb 100644 --- a/htdocs/admin/invoice.php +++ b/htdocs/admin/invoice.php @@ -133,7 +133,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->FACTURE_ADDON_PDF == "$value") { + if (getDolGlobalString('FACTURE_ADDON_PDF') == (string) $value) { dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity); } } @@ -569,7 +569,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->FACTURE_ADDON_PDF == "$name") { + if (getDolGlobalString('FACTURE_ADDON_PDF') == (string) $name) { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').''; diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index 727e1441ab2..b957c35029f 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -86,6 +86,13 @@ abstract class ModeleNumRefFicheinter extends CommonNumRefGenerator * @return string|int<-1,0> Next value if OK, <=0 if KO */ abstract public function getNextValue($objsoc = '', $object = ''); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index 3b5dae7cf95..0bc07d3e73a 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -90,4 +90,11 @@ abstract class ModelNumRefHolidays extends CommonNumRefGenerator * @return string|int<-1,0> Value if OK, <=0 if KO */ abstract public function getNextValue($objsoc, $holiday); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/hrm/modules_evaluation.php b/htdocs/core/modules/hrm/modules_evaluation.php index c2127651aad..02258ad5fa3 100644 --- a/htdocs/core/modules/hrm/modules_evaluation.php +++ b/htdocs/core/modules/hrm/modules_evaluation.php @@ -90,4 +90,12 @@ abstract class ModeleNumRefEvaluation extends CommonNumRefGenerator * @return string|int<-1,0> Value if OK, <=0 if KO */ abstract public function getNextValue($object); + + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); }