From 3da05238906d0c720e4acfbf95f2a139717507a6 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 13 Mar 2024 00:32:15 +0100 Subject: [PATCH] Fix PhanPluginRedundantAssignment --- htdocs/core/modules/product/mod_codeproduct_elephant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index d0bc9d30e16..644808826d5 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -4,6 +4,7 @@ * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -34,7 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php' */ class mod_codeproduct_elephant extends ModeleProductCode { - // variables inherited from ModelProductCode class public $name = 'Elephant'; public $version = 'dolibarr'; @@ -256,7 +256,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $code = strtoupper(trim($code)); if (empty($code) && $this->code_null && !getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) { - $result = 0; + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment } elseif (empty($code) && (!$this->code_null || getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) { $result = -2; } else {