Fix PhanPluginRedundantAssignment

This commit is contained in:
MDW 2024-03-13 00:32:15 +01:00
parent c247c8bca8
commit 3da0523890
No known key found for this signature in database

View file

@ -4,6 +4,7 @@
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 {