From f8dd44410a41582256fca380ef9ab45ceaf974ca Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 17 Nov 2025 15:03:30 +0100 Subject: [PATCH] refactor(proxy): simplify getNewerBranchInfo method parameters and streamline version checks --- app/Jobs/CheckTraefikVersionForServerJob.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Jobs/CheckTraefikVersionForServerJob.php b/app/Jobs/CheckTraefikVersionForServerJob.php index 27780553b..ac009811c 100644 --- a/app/Jobs/CheckTraefikVersionForServerJob.php +++ b/app/Jobs/CheckTraefikVersionForServerJob.php @@ -63,14 +63,13 @@ public function handle(): void } $currentBranch = $matches[1]; // e.g., "3.6" - $currentPatch = $matches[2]; // e.g., "0" // Find the latest version for this branch $latestForBranch = $this->traefikVersions["v{$currentBranch}"] ?? null; if (! $latestForBranch) { // User is on a branch we don't track - check if newer branches exist - $newerBranchInfo = $this->getNewerBranchInfo($current, $currentBranch); + $newerBranchInfo = $this->getNewerBranchInfo($currentBranch); if ($newerBranchInfo) { $this->storeOutdatedInfo($current, $newerBranchInfo['latest'], 'minor_upgrade', $newerBranchInfo['target']); @@ -86,7 +85,7 @@ public function handle(): void $latest = ltrim($latestForBranch, 'v'); // Always check for newer branches first - $newerBranchInfo = $this->getNewerBranchInfo($current, $currentBranch); + $newerBranchInfo = $this->getNewerBranchInfo($currentBranch); if (version_compare($current, $latest, '<')) { // Patch update available @@ -103,7 +102,7 @@ public function handle(): void /** * Get information about newer branches if available. */ - private function getNewerBranchInfo(string $current, string $currentBranch): ?array + private function getNewerBranchInfo(string $currentBranch): ?array { $newestBranch = null; $newestVersion = null;