summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules-available/locations/inc/location.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php
index 59e6d2b6..807f8577 100644
--- a/modules-available/locations/inc/location.inc.php
+++ b/modules-available/locations/inc/location.inc.php
@@ -8,7 +8,7 @@ class Location
private static $treeCache = false;
private static $subnetMapCache = false;
- public static function getTree()
+ public static function getTree(): array
{
if (self::$treeCache === false) {
self::$treeCache = self::queryLocations();
@@ -166,15 +166,15 @@ class Location
* Get nested array of all the locations and children of given locationid(s).
*
* @param int[]|int $idList List of location ids
- * @param bool $locationTree used in recursive calls, don't pass
+ * @param ?array $locationTree used in recursive calls, don't pass
* @return array list of passed locations plus their children
*/
- public static function getRecursive($idList, bool $locationTree = false): array
+ public static function getRecursive($idList, ?array $locationTree = null): array
{
if (!is_array($idList)) {
$idList = array($idList);
}
- if ($locationTree === false) {
+ if ($locationTree === null) {
$locationTree = self::getTree();
}
$ret = array();