From e64bf30bf64d10a7b1792398e1f79097b12f29da Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 23:15:11 +0100 Subject: [PATCH] Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify) --- htdocs/bom/bom_card.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index c4db4c61421..5753ce0bc89 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017-2023 Laurent Destailleur * Copyright (C) 2019 Frédéric France * Copyright (C) 2023 Charlene Benke + * 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 @@ -199,7 +200,7 @@ if (empty($reshook)) { } // We check if we're allowed to add this bom - $TParentBom=array(); + $TParentBom = array(); $object->getParentBomTreeRecursive($TParentBom); if ($bom_child_id > 0 && !empty($TParentBom) && in_array($bom_child_id, $TParentBom)) { $n_child = new BOM($db); @@ -306,7 +307,7 @@ $formfile = new FormFile($db); $title = $langs->trans('BOM'); -$help_url ='EN:Module_BOM'; +$help_url = 'EN:Module_BOM'; llxHeader('', $title, $help_url); // Part to create @@ -590,7 +591,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMProductsList'), '', 'product'); - print '
+ print ' @@ -642,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMServicesList'), '', 'service'); - print ' + print '