From 9df3baa5f1fc7c14bc6a17b55c32042d0c7becc8 Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 20 Jul 2025 02:08:33 -0700 Subject: [PATCH] Minor: standardize comment header, declare strict_types=1 --- src/RaspAP/Networking/Hotspot/DhcpcdManager.php | 17 ++++++++++++----- .../Networking/Hotspot/DnsmasqManager.php | 7 ++++--- .../Hotspot/Validators/HostapdValidator.php | 11 +++++++---- src/RaspAP/Networking/Hotspot/WiFiManager.php | 10 ++++++---- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/RaspAP/Networking/Hotspot/DhcpcdManager.php b/src/RaspAP/Networking/Hotspot/DhcpcdManager.php index 9e397112..50fc9433 100644 --- a/src/RaspAP/Networking/Hotspot/DhcpcdManager.php +++ b/src/RaspAP/Networking/Hotspot/DhcpcdManager.php @@ -1,12 +1,19 @@ + * @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE + */ + +declare(strict_types=1); + namespace RaspAP\Networking\Hotspot; use RaspAP\Messages\StatusMessage; -/** - * Handles dhcpcd.conf interface configuration. - */ class DhcpcdManager { private const CONF_DEFAULT = RASPI_DHCPCD_CONFIG; @@ -99,6 +106,7 @@ class DhcpcdManager ); } $dhcp_cfg = file_get_contents(SELF::CONF_DEFAULT); + $skip_dhcp = false; if (preg_match('/wlan[3-9]\d*|wlan[1-9]\d+/', $ap_iface)) { $skip_dhcp = true; @@ -280,8 +288,7 @@ class DhcpcdManager $lines = []; exec('cat ' . escapeshellarg($dnsmasqFile), $lines); if (!function_exists('ParseConfig')) { - // ensure legacy parser available - require_once RASPI_CONFIG . '/functions.php'; + require_once 'includes/functions.php'; } $conf = ParseConfig($lines); diff --git a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php index 94a45803..0b4cd81b 100644 --- a/src/RaspAP/Networking/Hotspot/DnsmasqManager.php +++ b/src/RaspAP/Networking/Hotspot/DnsmasqManager.php @@ -1,7 +1,5 @@ * @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE */ + +declare(strict_types=1); + +namespace RaspAP\Networking\Hotspot\Validators; + +use RaspAP\Messages\StatusMessage; + class HostapdValidator { diff --git a/src/RaspAP/Networking/Hotspot/WiFiManager.php b/src/RaspAP/Networking/Hotspot/WiFiManager.php index 4e2e4a9f..bc07fe1d 100644 --- a/src/RaspAP/Networking/Hotspot/WiFiManager.php +++ b/src/RaspAP/Networking/Hotspot/WiFiManager.php @@ -1,14 +1,16 @@ * @license https://github.com/raspap/raspap-webgui/blob/master/LICENSE */ +declare(strict_types=1); + +namespace RaspAP\Networking\Hotspot; + class WiFiManager {