From 9434cf50894c681632156467a2db0886e86cf2fc Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 15 Sep 2022 11:44:24 +0200 Subject: [PATCH] IcingaServiceSet: type hint for IDE --- library/Director/Objects/IcingaServiceSet.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaServiceSet.php b/library/Director/Objects/IcingaServiceSet.php index 6ebd570d..b7e6f356 100644 --- a/library/Director/Objects/IcingaServiceSet.php +++ b/library/Director/Objects/IcingaServiceSet.php @@ -94,7 +94,9 @@ class IcingaServiceSet extends IcingaObject implements ExportInterface if (empty($imports)) { return array(); } - return $this->getServiceObjectsForSet(array_shift($imports)); + $parent = array_shift($imports); + assert($parent instanceof IcingaServiceSet); + return $this->getServiceObjectsForSet($parent); } else { return $this->getServiceObjectsForSet($this); }