From 0a31addffebb211dd1755c336ea13167b85cf233 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 12 Sep 2023 13:55:35 +0200 Subject: [PATCH] X509\Sni: Cleanup some codes --- library/Icingadb/ProvidedHook/X509/Sni.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/library/Icingadb/ProvidedHook/X509/Sni.php b/library/Icingadb/ProvidedHook/X509/Sni.php index 4e42edbe..6f20a7df 100644 --- a/library/Icingadb/ProvidedHook/X509/Sni.php +++ b/library/Icingadb/ProvidedHook/X509/Sni.php @@ -24,17 +24,12 @@ class Sni extends SniHook { $this->getDb()->ping(); - $queryHost = Host::on($this->getDb()); - - $queryHost->getSelectBase(); - - $hostStatusCols = [ - 'host_name' => 'name', - 'host_address' => 'address', - 'host_address6' => 'address6' - ]; - - $queryHost = $queryHost->columns($hostStatusCols); + $queryHost = Host::on($this->getDb()) + ->columns([ + 'host_name' => 'name', + 'host_address' => 'address', + 'host_address6' => 'address6' + ]); $this->applyRestrictions($queryHost);