From 06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 14 Nov 2023 14:47:55 +0100 Subject: Add function param/return types, fix a lot more phpstorm complaints --- modules-available/locations/pages/subnets.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules-available/locations/pages/subnets.inc.php') diff --git a/modules-available/locations/pages/subnets.inc.php b/modules-available/locations/pages/subnets.inc.php index e568c655..7628486b 100644 --- a/modules-available/locations/pages/subnets.inc.php +++ b/modules-available/locations/pages/subnets.inc.php @@ -3,7 +3,7 @@ class SubPage { - public static function doPreprocess($action) + public static function doPreprocess(string $action): bool { if ($action === 'updatesubnets') { self::updateSubnets(); @@ -42,7 +42,7 @@ class SubPage continue; } $range = LocationUtil::rangeToLongVerbose($start, $end); - if ($range === false) + if ($range === null) continue; list($startLong, $endLong) = $range; if ($stmt->execute(compact('startLong', 'endLong', 'loc', 'subnetid'))) { @@ -59,7 +59,7 @@ class SubPage Util::redirect('?do=Locations'); } - public static function doRender($getAction) + public static function doRender($getAction): bool { if ($getAction === false) { User::assertPermission('subnets.edit', NULL, '?do=locations'); @@ -81,7 +81,7 @@ class SubPage return false; } - public static function doAjax($action) + public static function doAjax($action): bool { return false; } -- cgit v1.2.3-55-g7522