From 6df8c0373c2f52ddb173171f296a99ca2ed5f2a9 Mon Sep 17 00:00:00 2001 From: Nicolas Demangeat Date: Thu, 12 Oct 2023 15:13:58 +0200 Subject: [PATCH] fix phpcs --- app/Http/Controllers/API/NetworksController.php | 4 ++-- app/Rules/CidrRule.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/API/NetworksController.php b/app/Http/Controllers/API/NetworksController.php index 19574b6..c2b979e 100644 --- a/app/Http/Controllers/API/NetworksController.php +++ b/app/Http/Controllers/API/NetworksController.php @@ -19,8 +19,8 @@ class NetworksController extends Controller $networks = Network::all(); foreach ($networks as $network) { $infos = explode('.', $network->first_ip); - $min = $infos[3]; - $max = explode('.', $network->last_ip)[3]; + $min = $infos[3]; + $max = explode('.', $network->last_ip)[3]; for ($i = $min; $i <= $max; $i++) { $ips[] = "$infos[0].$infos[1].$infos[2].$i"; } diff --git a/app/Rules/CidrRule.php b/app/Rules/CidrRule.php index c1cd65f..863d2e4 100644 --- a/app/Rules/CidrRule.php +++ b/app/Rules/CidrRule.php @@ -14,7 +14,7 @@ class CidrRule implements Rule * @return boolean * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed */ - public function passes($attribute, $value) + public function passes(mixed $attribute, mixed $value) { // phpcs:enable $m = true;