From d059cefea6b5ceea2f0c252980276914759e2ea9 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Tue, 15 Sep 2026 16:49:29 +0800 Subject: [PATCH] refactor(compiler): rename variable for clarity - Changed $candidate to $autoloadFile for better readability - Updated variable references in conditional check - Maintained same logic for autoload file path construction - Kept existing rtrim functionality for directory separators - Preserved array uniqueness check with in_array function --- src/compiler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler.php b/src/compiler.php index 145135d7..4ca43554 100644 --- a/src/compiler.php +++ b/src/compiler.php @@ -150,9 +150,9 @@ function resolveComposerAutoloader(): string if (!is_string($root) || $root === '') { continue; } - $candidate = rtrim($root, '/\\') . '/vendor/autoload.php'; - if (!in_array($candidate, $candidates, true)) { - $candidates[] = $candidate; + $autoloadFile = rtrim($root, '/\\') . '/vendor/autoload.php'; + if (!in_array($autoloadFile, $candidates, true)) { + $candidates[] = $autoloadFile; } }