From 0b67bf4dad96eb0bc42c8a7b77684eb32e11fb50 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Fri, 7 Feb 2025 13:00:24 +0100 Subject: [PATCH] Fix phan --- htdocs/core/modules/project/modules_project.php | 2 +- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 2 ++ .../modules/mymodule/doc/doc_generic_myobject_odt.modules.php | 1 + .../doc/doc_generic_recruitmentjobposition_odt.modules.php | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 48885f0e4c7..f0f8bdf6cb1 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -68,7 +68,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator /** * Function to build pdf project onto disk * - * @param Project $object Object source to build document + * @param Task $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @return int<-1,1> 1 if OK, <=0 if KO diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 2eb87a0189f..6c9f3b43861 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -606,6 +606,8 @@ class doc_generic_task_odt extends ModelePDFTask } } + /** var Task $object */ + // Replace tags of lines for tasks try { // Security check diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index e4f82b3a537..59ae7b1ec71 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -445,6 +445,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject if ($foundtagforlines) { $linenumber = 0; foreach ($object->lines as $line) { + /** @var CommonObjectLine $line */ $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php index f40dcf70b41..637ba4f0cba 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php @@ -437,6 +437,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi if ($foundtagforlines) { $linenumber = 0; foreach ($object->lines as $line) { + /** @var CommonObjectLine $line */ $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");