From e81822237a178e79d4ead168857f68b2026cbce3 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 23 Jan 2024 09:36:05 +0100 Subject: [PATCH] Fix some issues found by phpstan --- library/Icingadb/Widget/Detail/EventDetail.php | 2 +- library/Icingadb/Widget/HostSummaryDonut.php | 2 +- library/Icingadb/Widget/ServiceSummaryDonut.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icingadb/Widget/Detail/EventDetail.php b/library/Icingadb/Widget/Detail/EventDetail.php index 0b3c09a78..aaf76082f 100644 --- a/library/Icingadb/Widget/Detail/EventDetail.php +++ b/library/Icingadb/Widget/Detail/EventDetail.php @@ -567,7 +567,7 @@ protected function assembleAcknowledgeEvent(AcknowledgementHistory $acknowledgem if ($acknowledgement->cleared_by) { $eventInfo[] = new HorizontalKeyValue( t('Cleared by'), - [new Icon('user', $acknowledgement->cleared_by)] + [new Icon('user'), $acknowledgement->cleared_by] ); } else { $expired = false; diff --git a/library/Icingadb/Widget/HostSummaryDonut.php b/library/Icingadb/Widget/HostSummaryDonut.php index db5fef8c5..5efcf74d0 100644 --- a/library/Icingadb/Widget/HostSummaryDonut.php +++ b/library/Icingadb/Widget/HostSummaryDonut.php @@ -47,7 +47,7 @@ protected function assembleBody(BaseHtmlElement $body) ->addSlice($this->summary->hosts_down_handled, ['class' => 'slice-state-critical-handled']) ->addSlice($this->summary->hosts_down_unhandled, ['class' => 'slice-state-critical']) ->addSlice($this->summary->hosts_pending, ['class' => 'slice-state-pending']) - ->setLabelBig($this->summary->hosts_down_unhandled) + ->setLabelBig((string) $this->summary->hosts_down_unhandled) ->setLabelBigUrl(Links::hosts()->setFilter($labelBigUrlFilter)->addParams([ 'sort' => 'host.state.last_state_change' ])) diff --git a/library/Icingadb/Widget/ServiceSummaryDonut.php b/library/Icingadb/Widget/ServiceSummaryDonut.php index e806fba0f..e6b38a103 100644 --- a/library/Icingadb/Widget/ServiceSummaryDonut.php +++ b/library/Icingadb/Widget/ServiceSummaryDonut.php @@ -50,7 +50,7 @@ protected function assembleBody(BaseHtmlElement $body) ->addSlice($this->summary->services_unknown_handled, ['class' => 'slice-state-unknown-handled']) ->addSlice($this->summary->services_unknown_unhandled, ['class' => 'slice-state-unknown']) ->addSlice($this->summary->services_pending, ['class' => 'slice-state-pending']) - ->setLabelBig($this->summary->services_critical_unhandled) + ->setLabelBig((string) $this->summary->services_critical_unhandled) ->setLabelBigUrl(Links::services()->setFilter($labelBigUrlFilter)->addParams([ 'sort' => 'service.state.last_state_change' ]))