Skip to content

Commit

Permalink
add phpdoc and clean phpstan baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Nov 6, 2024
1 parent 7af90a7 commit dc9bc39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 148 deletions.
145 changes: 0 additions & 145 deletions build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10680,11 +10680,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -10730,11 +10725,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/bank/doc/pdf_ban.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/bank/doc/pdf_ban.modules.php

-
message: "#^Parameter \\#3 \\$tab_height of method pdf_ban\\:\\:_tableau\\(\\) expects int, float given\\.$#"
count: 2
Expand All @@ -10745,11 +10735,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_sepamandate\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -10855,11 +10840,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_einstein\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -10930,11 +10910,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_eratosthene\\:\\:drawInfoTable\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11005,11 +10980,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/contract/doc/pdf_strato.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/contract/doc/pdf_strato.modules.php

-
message: "#^Parameter \\#3 \\$tab_height of method pdf_strato\\:\\:tabSignature\\(\\) expects int, float given\\.$#"
count: 2
Expand Down Expand Up @@ -11045,11 +11015,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/delivery/doc/pdf_storm.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/delivery/doc/pdf_storm.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_storm\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11100,11 +11065,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/delivery/doc/pdf_typhon.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/delivery/doc/pdf_typhon.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_typhon\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11180,11 +11140,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_espadon.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_espadon.modules.php

-
message: "#^Parameter \\#4 \\$columnText of method CommonDocGenerator\\:\\:printStdColumnContent\\(\\) expects string, float given\\.$#"
count: 2
Expand Down Expand Up @@ -11220,11 +11175,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_merou.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_merou.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11260,11 +11210,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php

-
message: "#^Parameter \\#4 \\$posy of method pdf_rouget\\:\\:_tableau_tot\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11395,11 +11340,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_crabe\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11510,11 +11450,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_octopus\\:\\:drawInfoTable\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11610,11 +11545,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_sponge\\:\\:drawInfoTable\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -11730,11 +11660,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php

-
message: "#^Parameter \\#5 \\$marge_basse of function pdf_pagefoot expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12160,11 +12085,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php

-
message: "#^Parameter \\#4 \\$w of function pdf_watermark expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12450,11 +12370,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/product/doc/pdf_standard.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/product/doc/pdf_standard.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12515,11 +12430,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/project/doc/pdf_baleine.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/project/doc/pdf_baleine.modules.php

-
message: "#^Parameter \\#5 \\$marge_basse of function pdf_pagefoot expects int, float given\\.$#"
count: 1
Expand All @@ -12545,11 +12455,6 @@ parameters:
count: 2
path: ../../htdocs/core/modules/project/doc/pdf_beluga.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/project/doc/pdf_beluga.modules.php

-
message: "#^Parameter \\#5 \\$marge_basse of function pdf_pagefoot expects int, float given\\.$#"
count: 1
Expand All @@ -12565,11 +12470,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/project/doc/pdf_timespent.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/project/doc/pdf_timespent.modules.php

-
message: "#^Parameter \\#5 \\$marge_basse of function pdf_pagefoot expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12690,11 +12590,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/propale/doc/pdf_azur.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/propale/doc/pdf_azur.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_azur\\:\\:_tableau_info\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12760,11 +12655,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/propale/doc/pdf_cyan.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/propale/doc/pdf_cyan.modules.php

-
message: "#^Parameter \\#3 \\$posy of method pdf_cyan\\:\\:drawInfoTable\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12820,11 +12710,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/reception/doc/pdf_squille.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/reception/doc/pdf_squille.modules.php

-
message: "#^Parameter \\#4 \\$posy of method pdf_squille\\:\\:_tableau_tot\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12935,11 +12820,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -12985,11 +12865,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php

-
message: "#^Parameter \\#4 \\$posy of method pdf_eagle\\:\\:_tableau_tot\\(\\) expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -13040,11 +12915,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -13405,11 +13275,6 @@ parameters:
count: 1
path: ../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php

-
message: "#^Parameter \\#4 \\$cury of function pdf_bank expects int, float given\\.$#"
count: 1
Expand Down Expand Up @@ -20270,11 +20135,6 @@ parameters:
count: 1
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php

-
message: "#^Parameter \\#3 \\$tab_height of method pdf_standard_myobject\\:\\:_tableau\\(\\) expects int, float given\\.$#"
count: 6
Expand Down Expand Up @@ -25675,11 +25535,6 @@ parameters:
count: 1
path: ../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php

-
message: "#^Parameter \\#3 \\$page_height of function pdf_pagehead expects int, float given\\.$#"
count: 1
path: ../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php

-
message: "#^Parameter \\#4 \\$posx of function pdf_writeLinkedObjects expects int, float given\\.$#"
count: 1
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/lib/pdf.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t
*
* @param TCPDF $pdf Object PDF
* @param Translate $outputlangs Object lang for output
* @param int $page_height Height of page
* @param float $page_height Height of page
* @return void
*/
function pdf_pagehead(&$pdf, $outputlangs, $page_height)
Expand All @@ -736,9 +736,9 @@ function pdf_pagehead(&$pdf, $outputlangs, $page_height)
if (file_exists($filepath)) {
$pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image
if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF_ALPHA')) {
$pdf->SetAlpha($conf->global->MAIN_USE_BACKGROUND_ON_PDF_ALPHA);
$pdf->SetAlpha(getDolGlobalFloat('MAIN_USE_BACKGROUND_ON_PDF_ALPHA'));
} // Option for change opacity of background
$pdf->Image($filepath, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0), 0, $page_height);
$pdf->Image($filepath, getDolGlobalFloat('MAIN_USE_BACKGROUND_ON_PDF_X'), getDolGlobalFloat('MAIN_USE_BACKGROUND_ON_PDF_Y'), 0, $page_height);
if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF_ALPHA')) {
$pdf->SetAlpha(1);
}
Expand Down

0 comments on commit dc9bc39

Please sign in to comment.