Fix PHPdoc typing ($cols, $phpmin)
This commit is contained in:
parent
8b960280d9
commit
baaa7c721e
8 changed files with 34 additions and 31 deletions
|
|
@ -81,7 +81,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
|||
public $situationinvoice;
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of document table columns
|
||||
*/
|
||||
public $cols;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of document table columns
|
||||
*/
|
||||
public $cols;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of columns
|
||||
*/
|
||||
public $cols;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of columns
|
||||
*/
|
||||
public $cols;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* 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
|
||||
|
|
@ -47,7 +48,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* @var array{0:int,1:int} Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 7.0 = array(7, 0)
|
||||
*/
|
||||
public $phpmin = array(7, 0);
|
||||
|
|
@ -336,7 +337,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$substitutionarray);
|
||||
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$substitutionarray);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Line of free text
|
||||
|
|
@ -395,7 +396,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
foreach ($tmparray as $key => $value) {
|
||||
|
|
@ -436,7 +437,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
|
||||
// Call the ODTSubstitutionLine hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray, 'line' => $line);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
|
|
@ -469,7 +470,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
|
||||
// Call the beforeODTSave hook
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Write new file
|
||||
|
|
@ -491,14 +492,14 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
|
|||
}
|
||||
}
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
dolChmod($file);
|
||||
|
||||
$odfHandler = null; // Destroy object
|
||||
|
||||
$this->result = array('fullpath'=>$file);
|
||||
$this->result = array('fullpath' => $file);
|
||||
|
||||
return 1; // Success
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* 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
|
||||
|
|
@ -74,7 +75,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
public $type;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* @var array{0:int,1:int} Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 7.0 = array(7, 0)
|
||||
*/
|
||||
public $phpmin = array(7, 0);
|
||||
|
|
@ -92,7 +93,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of columns
|
||||
*/
|
||||
public $cols;
|
||||
|
||||
|
|
@ -282,7 +283,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
$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
|
||||
|
||||
|
|
@ -640,9 +641,9 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
$parameters = array(
|
||||
'object' => $object,
|
||||
'i' => $i,
|
||||
'pdf' =>& $pdf,
|
||||
'curY' =>& $curY,
|
||||
'nexY' =>& $nexY,
|
||||
'pdf' => & $pdf,
|
||||
'curY' => & $curY,
|
||||
'nexY' => & $nexY,
|
||||
'outputlangs' => $outputlangs,
|
||||
'hidedetails' => $hidedetails
|
||||
);
|
||||
|
|
@ -712,17 +713,17 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
|
||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
|
||||
}
|
||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
|
||||
|
||||
$nexY = max($nexY, $posYAfterImage);
|
||||
|
||||
// Add line
|
||||
if (getDolGlobalInt('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, $this->page_largeur - $this->marge_droite, $nexY);
|
||||
$pdf->SetLineStyle(array('dash'=>0));
|
||||
$pdf->SetLineStyle(array('dash' => 0));
|
||||
}
|
||||
|
||||
// Detect if some page were added automatically and output _tableau for past pages
|
||||
|
|
@ -798,7 +799,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
|
||||
// Add pdfgeneration hook
|
||||
$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) {
|
||||
|
|
@ -808,7 +809,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||
|
||||
dolChmod($file);
|
||||
|
||||
$this->result = array('fullpath'=>$file);
|
||||
$this->result = array('fullpath' => $file);
|
||||
|
||||
return 1; // No error
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* 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
|
||||
|
|
@ -48,7 +49,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
public $emetteur;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* @var array{0:int,1:int} Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 7.0 = array(7, 0)
|
||||
*/
|
||||
public $phpmin = array(7, 0);
|
||||
|
|
@ -335,7 +336,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$substitutionarray);
|
||||
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$substitutionarray);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Line of free text
|
||||
|
|
@ -394,7 +395,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
foreach ($tmparray as $key => $value) {
|
||||
|
|
@ -434,7 +435,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
|
||||
// Call the ODTSubstitutionLine hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray, 'line' => $line);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
|
|
@ -467,7 +468,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
|
||||
// Call the beforeODTSave hook
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Write new file
|
||||
|
|
@ -489,14 +490,14 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
|
|||
}
|
||||
}
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
dolChmod($file);
|
||||
|
||||
$odfHandler = null; // Destroy object
|
||||
|
||||
$this->result = array('fullpath'=>$file);
|
||||
$this->result = array('fullpath' => $file);
|
||||
|
||||
return 1; // Success
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||
public $type;
|
||||
|
||||
/**
|
||||
* @var array Minimum version of PHP required by module.
|
||||
* @var array{0:int,1:int} Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 7.0 = array(7, 0)
|
||||
*/
|
||||
public $phpmin = array(7, 0);
|
||||
|
|
@ -108,7 +108,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||
public $defaultTitlesFieldsStyle = array();
|
||||
|
||||
/**
|
||||
* @var array of document table columns
|
||||
* @var array<string,array{rank:int,width:float|int,title:array{textkey:string,label:string,align:string,padding:array{0:float,1:float,2:float,3:float}},content:array{align:string,padding:array{0:float,1:float,2:float,3:float}}}> Array of document tablecolumns
|
||||
*/
|
||||
public $cols = array();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue