diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 3253d7ce1c2..547c9334fbd 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -12090,12 +12090,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php - - message: '#^Property Commande\:\:\$availability \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -12276,12 +12270,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/delivery/doc/pdf_storm.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/delivery/doc/pdf_storm.modules.php - - message: '#^Property CommonDocGenerator\:\:\$cols \(array\\) does not accept non\-empty\-array\\.$#' identifier: assign.propertyType @@ -12330,12 +12318,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/delivery/doc/pdf_typhon.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/delivery/doc/pdf_typhon.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -12462,12 +12444,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -12558,12 +12534,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php - - message: '#^Property CommonInvoice\:\:\$type \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -13746,12 +13716,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, Mo given\.$#' identifier: argument.type @@ -14130,12 +14094,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -14298,12 +14256,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/reception/doc/pdf_squille.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/reception/doc/pdf_squille.modules.php - - message: '#^Property Reception\:\:\$trueWeight \(float\|int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -14346,18 +14298,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php - - - message: '#^Parameter \#4 \$posy of method pdf_eagle\:\:_tableau_tot\(\) expects int, float given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php - - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php - - message: '#^Property CommonDocGenerator\:\:\$cols \(array\\) does not accept non\-empty\-array\\.$#' identifier: assign.propertyType @@ -14466,12 +14406,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -14658,12 +14592,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php - - message: '#^Property CommandeFournisseur\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -14712,12 +14640,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php - - - message: '#^Parameter \#5 \$w of function pdf_writelinedesc expects int, float given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php - - message: '#^Property SupplierProposal\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' identifier: isset.property diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 010d5f87eed..3945810f622 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1431,8 +1431,8 @@ function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, * @param CommonObject $object Object * @param int $i Current line number * @param Translate $outputlangs Object lang for output - * @param int $w Width - * @param int $h Height + * @param float $w Width + * @param float $h Height * @param float $posx Pos x * @param float $posy Pos y * @param int<0,1> $hideref Hide reference diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index 2a6b0cc2676..702ffad456a 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014-2015 Marcos García - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Nick Fragoulis @@ -775,12 +775,12 @@ class pdf_eagle extends ModelePDFStockTransfer * * @param TCPDF $pdf Object PDF * @param StockTransfer $object Object StockTransfer - * @param int $deja_regle Amount already paid - * @param int $posy Start Position + * @param float $already_paid Amount already paid / not used + * @param float $posy Start Position * @param Translate $outputlangs Object langs - * @return int Position for suite + * @return float Position for suite */ - protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) + protected function _tableau_tot(&$pdf, $object, $already_paid, $posy, $outputlangs) { // phpcs:enable $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index d9375e93809..de6a8693412 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -843,11 +843,11 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer /** * Show miscellaneous information (payment mode, payment term, ...) * - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $posy Y - * @param Translate $outputlangs Langs object - * @return int Pos y + * @param TCPDF $pdf Object PDF + * @param StockTransfer $object Object to show + * @param int $posy Y + * @param Translate $outputlangs Langs object + * @return int Pos y */ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs) { @@ -1186,7 +1186,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer * Show top header of page. * * @param TCPDF $pdf Object PDF - * @param Object $object Object to show + * @param StockTransfer $object Object to show * @param int<0,1> $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param string $titlekey Translation key to show as title of document @@ -1207,7 +1207,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK')) { + if ($object->status == 0 && getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK')) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('COMMANDE_DRAFT_WATERMARK')); }