cleanup function/parameters and add type declarations where possible

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-02-07 11:15:19 +01:00
parent c3f769d48b
commit 464663877c
31 changed files with 928 additions and 651 deletions

View File

@@ -30,8 +30,10 @@ use PDO;
class IpAddr
{
public static function getIpAddresses()
/**
* @return array
*/
public static function getIpAddresses(): array
{
$result_stmt = Database::query("
SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC
@@ -51,14 +53,22 @@ class IpAddr
return $system_ipaddress_array;
}
public static function getSslIpPortCombinations()
/**
* @return array
*/
public static function getSslIpPortCombinations(): array
{
return [
'' => lng('panel.none_value')
] + self::getIpPortCombinations(true);
}
public static function getIpPortCombinations($ssl = false)
/**
* @param bool $ssl
* @return array
* @throws \Exception
*/
public static function getIpPortCombinations(bool $ssl = false): array
{
global $userinfo;