IcingaServiceSet: type hint for IDE

This commit is contained in:
Thomas Gelf 2022-09-15 11:44:24 +02:00
parent 0cf8c76617
commit 9434cf5089
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ class IcingaServiceSet extends IcingaObject implements ExportInterface
if (empty($imports)) { if (empty($imports)) {
return array(); return array();
} }
return $this->getServiceObjectsForSet(array_shift($imports)); $parent = array_shift($imports);
assert($parent instanceof IcingaServiceSet);
return $this->getServiceObjectsForSet($parent);
} else { } else {
return $this->getServiceObjectsForSet($this); return $this->getServiceObjectsForSet($this);
} }