From a25e8ee14de2c08067dba4ad24bdea1f8a51a682 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Thu, 14 Mar 2024 15:09:44 +0100 Subject: [PATCH 1/3] FIX PHPStan warnings --- htdocs/core/modules/member/doc/pdf_standard.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 8585f4ee1b441..5ce0565f4eb7d 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -263,7 +263,7 @@ public function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $ /** * Function to build PDF on disk, then output on HTTP stream. * - * @param Adherent $object Member object. Old usage: Array of record information (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>) + * @param mixed $object Member object. Old usage: Array of record information (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>) * @param Translate $outputlangs Lang object for output language * @param string $srctemplatepath Full path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ... * @param string $mode Tell if doc module is called for 'member', ... From 4a53b3dd1770b50f786dbc35f602bad60248b811 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Fri, 15 Mar 2024 14:37:35 +0100 Subject: [PATCH 2/3] fix type by adding both to doc function --- htdocs/core/modules/member/doc/pdf_standard.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 5ce0565f4eb7d..db1b90f111832 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -263,7 +263,7 @@ public function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $ /** * Function to build PDF on disk, then output on HTTP stream. * - * @param mixed $object Member object. Old usage: Array of record information (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>) + * @param Adherent|array $object Member object. Old usage: Array of record information (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>) * @param Translate $outputlangs Lang object for output language * @param string $srctemplatepath Full path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ... * @param string $mode Tell if doc module is called for 'member', ... From d9694bec3dca878ab23d0d5a2b29a1b0df39eb21 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Fri, 15 Mar 2024 14:38:22 +0100 Subject: [PATCH 3/3] fix type by adding both to doc function --- htdocs/core/modules/member/doc/pdf_standard.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index db1b90f111832..b8b8acbbec119 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -264,11 +264,11 @@ public function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $ * Function to build PDF on disk, then output on HTTP stream. * * @param Adherent|array $object Member object. Old usage: Array of record information (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>) - * @param Translate $outputlangs Lang object for output language - * @param string $srctemplatepath Full path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ... - * @param string $mode Tell if doc module is called for 'member', ... - * @param int $nooutput 1=Generate only file on disk and do not return it on response - * @param string $filename Name of output file (without extension) + * @param Translate $outputlangs Lang object for output language + * @param string $srctemplatepath Full path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ... + * @param string $mode Tell if doc module is called for 'member', ... + * @param int $nooutput 1=Generate only file on disk and do not return it on response + * @param string $filename Name of output file (without extension) * @return int 1=OK, 0=KO */ public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0, $filename = 'tmp_cards')