From d0631e60bf044dcac4bf2a44e32d298c9a6cd00d Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 24 Mar 2024 21:37:18 +0100 Subject: [PATCH] Force typing (phan) for typing checks --- htdocs/contrat/class/contrat.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 2f5fe9a8aea..889eab0f993 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -346,6 +346,7 @@ class Contrat extends CommonObject } $obj = new $classname(); + '@phan-var-force CommonNumRefGenerator $obj'; $numref = $obj->getNextValue($soc, $this); if ($numref != "") { @@ -1064,6 +1065,7 @@ class Contrat extends CommonObject $result = dol_include_once('/core/modules/contract/'.$module.'.php'); if ($result > 0) { $modCodeContract = new $module(); + '@phan-var-force CommonNumRefGenerator $modCodeContrat'; if (!empty($modCodeContract->code_auto)) { // Force the ref to a draft value if numbering module is an automatic numbering @@ -2686,6 +2688,7 @@ class Contrat extends CommonObject require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php'; $obj = getDolGlobalString('CONTRACT_ADDON'); $modContract = new $obj(); + '@phan-var-force CommonNumRefGenerator $modContrat'; $clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj); // get extrafields so they will be clone