From c3ad6899732ef3bc7fc7bd5e05dc6b4469a458a0 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Wed, 20 Mar 2024 14:15:02 +0100 Subject: [PATCH] Fix return method deleteLine (PHPStan warnings --- htdocs/expedition/class/api_shipments.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 2eb5f95d05e..505c6f3a5a4 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -410,7 +410,12 @@ class Shipments extends DolibarrApi $updateRes = $this->shipment->deleteLine(DolibarrApiAccess::$user, $lineid); if ($updateRes > 0) { - return $this->get($id); + return array( + 'success' => array( + 'code' => 200, + 'message' => 'line ' .$lineid. ' deleted' + ) + ); } else { throw new RestException(405, $this->shipment->error); }