From 11cb6282b628314d7fd9069fd391c08bd818c6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 27 Jan 2025 19:55:39 +0100 Subject: [PATCH] clean phpstan baseline --- dev/build/phpstan/phpstan-baseline.neon | 6 ------ htdocs/expedition/class/expedition.class.php | 9 +++++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 8e71cfc7fa8..4fc54d336a2 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -17064,12 +17064,6 @@ parameters: count: 1 path: ../../../htdocs/expedition/class/expedition.class.php - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 77 - path: ../../../htdocs/expedition/class/expedition.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 10f7f21e68e..61e50c14373 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -11,7 +11,7 @@ * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2016-2024 Ferran Marcet * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2020 Lenin Rivas * Copyright (C) 2024 MDW * Copyright (C) 2024 William Mead @@ -1716,6 +1716,7 @@ class Expedition extends CommonObject $num = $this->db->num_rows($resql); $i = 0; + $line = new ExpeditionLigne($this->db); $lineindex = 0; $originline = 0; @@ -1741,8 +1742,8 @@ class Expedition extends CommonObject $line->qty_shipped += $obj->qty_shipped; } else { $line = new ExpeditionLigne($this->db); // new group to start - $line->entrepot_id = $obj->fk_entrepot; // this is a property of a shipment line - $line->qty_shipped = $obj->qty_shipped; // this is a property of a shipment line + $line->entrepot_id = $obj->fk_entrepot; // this is a property of a shipment line + $line->qty_shipped = $obj->qty_shipped; // this is a property of a shipment line } $detail_entrepot = new stdClass(); @@ -1772,7 +1773,7 @@ class Expedition extends CommonObject $line->product_ref = $obj->product_ref; $line->product_label = $obj->product_label; $line->libelle = $obj->product_label; // TODO deprecated - $line->product_barcode = $obj->product_barcode; // Barcode number product + $line->product_barcode = $obj->product_barcode; // Barcode number product $line->product_tosell = $obj->product_tosell; $line->product_tobuy = $obj->product_tobuy; $line->product_tobatch = $obj->product_tobatch;