From cd3b5a38d263b18c3733e7e8265f065073959aeb Mon Sep 17 00:00:00 2001 From: raviks789 Date: Tue, 8 Oct 2024 16:47:32 +0200 Subject: [PATCH] fix: cs errors --- library/Icingadb/Common/StateBadges.php | 4 ++-- library/Icingadb/Widget/ItemList/RedundancyGroupListItem.php | 4 ++-- library/Icingadb/Widget/ItemList/StateListItem.php | 3 +-- library/Icingadb/Widget/ObjectsStatistics.php | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/library/Icingadb/Common/StateBadges.php b/library/Icingadb/Common/StateBadges.php index c497531e5..2836407bc 100644 --- a/library/Icingadb/Common/StateBadges.php +++ b/library/Icingadb/Common/StateBadges.php @@ -27,7 +27,7 @@ abstract class StateBadges extends BaseHtmlElement /** @var string Prefix */ protected $prefix; - /** @var Url Badge link */ + /** @var ?Url Badge link */ protected $url; protected $tag = 'ul'; @@ -82,7 +82,7 @@ protected function getBaseUrl(): ?Url */ protected function getStateInt(string $state): int { - throw new InvalidArgumentException('%s is not a valid state', $state); + throw new InvalidArgumentException('%s is not a valid state', $state); } /** diff --git a/library/Icingadb/Widget/ItemList/RedundancyGroupListItem.php b/library/Icingadb/Widget/ItemList/RedundancyGroupListItem.php index 69fdba148..cf162f24a 100644 --- a/library/Icingadb/Widget/ItemList/RedundancyGroupListItem.php +++ b/library/Icingadb/Widget/ItemList/RedundancyGroupListItem.php @@ -145,9 +145,9 @@ protected function assembleCaption(BaseHtmlElement $caption): void /** @var RedundancyGroup $data */ $data = $members->first(); - if($data) { + if ($data) { $caption->addHtml(new PluginOutputContainer( - (new PluginOutput($data->objects_output . "\n" .$data->objects_long_output)) + (new PluginOutput($data->objects_output . "\n" . $data->objects_long_output)) ->setCommandName($data->objects_checkcommand_name) )); } diff --git a/library/Icingadb/Widget/ItemList/StateListItem.php b/library/Icingadb/Widget/ItemList/StateListItem.php index adb68e586..949fa3620 100644 --- a/library/Icingadb/Widget/ItemList/StateListItem.php +++ b/library/Icingadb/Widget/ItemList/StateListItem.php @@ -108,8 +108,7 @@ protected function assembleTitle(BaseHtmlElement $title): void ->addAttributes([ 'class' => 'affected-objects', 'title' => sprintf(t('Up to %s affected objects'), $total) - ]) - ); + ])); } } diff --git a/library/Icingadb/Widget/ObjectsStatistics.php b/library/Icingadb/Widget/ObjectsStatistics.php index 721b8ec74..d32eb4b4b 100644 --- a/library/Icingadb/Widget/ObjectsStatistics.php +++ b/library/Icingadb/Widget/ObjectsStatistics.php @@ -5,7 +5,6 @@ namespace Icinga\Module\Icingadb\Widget; use Icinga\Chart\Donut; - use Icinga\Module\Icingadb\Model\RedundancyGroupParentStateSummary; use Icinga\Module\Icingadb\Widget\Detail\ObjectStatistics; use ipl\Html\Text;