From b10686cb2b74bd7e1f03f0a87f4dc6b50b58a158 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Apr 2025 01:23:49 +0200 Subject: [PATCH] Clean code --- htdocs/core/boxes/box_dolibarr_state_board.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index 13d563c60dc..c0ee004ccc2 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -257,7 +257,7 @@ class box_dolibarr_state_board extends ModeleBoxes if (method_exists($board, 'load_state_board')) { // @phan-suppress-next-line PhanUndeclaredMethod (Legacy, not present in core). $board->load_state_board(); - } elseif (method_exists($board, 'loadStateBoard')) { + } elseif (method_exists($board, 'loadStateBoard')) { // @phpstan-ignore-current-line $board->loadStateBoard(); } else { $board = -1; @@ -284,7 +284,7 @@ class box_dolibarr_state_board extends ModeleBoxes if (!empty($boxstatFromHook) || !empty($boxstatItems)) { $boxstat .= $boxstatFromHook; - if (is_array($boxstatItems) && count($boxstatItems) > 0) { + if (!empty($boxstatItems)) { $boxstat .= implode('', $boxstatItems); }