From edaad7eb62fcc449ea0bc6704fda031e31db0ab9 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 13 Mar 2024 00:30:18 +0100 Subject: [PATCH] Fix PhanPluginRedundantAssignment --- .../modules/delivery/doc/pdf_typhon.modules.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index a851802251f..fd6c949ab05 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2008 Chiptronik * Copyright (C) 2011-2021 Philippe Grand * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2024 MDW * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -186,7 +187,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -426,10 +427,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -562,7 +563,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -572,7 +573,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -828,7 +829,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if ($this->page_largeur < 210) { $widthrecbox = 84; // To work with US executive format } - $posy = 42; + $posy = 42; // @phan-suppress-current-line PhanPluginRedundantAssignment $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) { $posx = $this->marge_gauche;