Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions (#28749)

# Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions

Fix occurences of PhanPluginDuplicateIfStatements which are if statements where the
consecutive branches execute the same code, making it useles to test the condition
This commit is contained in:
MDW
2024-03-11 12:58:51 +01:00
committed by GitHub
parent aee0509473
commit dbfb1180ee
23 changed files with 1535 additions and 1683 deletions

View File

@@ -12,6 +12,7 @@
* Copyright (C) 2016-2023 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2021-2024 Anthony Berton <anthony.berton@bb2a.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
@@ -783,11 +784,7 @@ if (!$error && $massaction === 'setbilled' && $permissiontoclose) {
}
if (!$error) {
if ($nbok > 1) {
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
} else {
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
}
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
$db->commit();
} else {
$db->rollback();