fix phpstan (#26537)

This commit is contained in:
Frédéric FRANCE
2023-11-10 18:45:52 +01:00
committed by GitHub
parent 01d3526d8d
commit ed9d5ce2c3

View File

@@ -166,9 +166,9 @@ class pdf_paiement extends CommonDocGenerator
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'outputlangs'=>$outputlangs);
$parameters = array('file'=>$file, 'object'=>$this, 'outputlangs'=>$outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $this, $action); // Note that $action and $this may have been modified by some hooks
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
@@ -356,7 +356,7 @@ class pdf_paiement extends CommonDocGenerator
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file'=>$file, 'object'=>$this, '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) {