mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Fix PhanPluginRedundantAssignment
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2008 Chiptronik
|
||||
* Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
* 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;
|
||||
|
||||
Reference in New Issue
Block a user