From f3a6e1a48c89dbb1b682907e244cb4bec02315e1 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sun, 10 May 2020 16:01:45 -0400 Subject: [PATCH] Fix ref --- src/Psalm/Config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 3c59748b4d2..ff7ad5e4ca4 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -1857,8 +1857,9 @@ public function visitComposerAutoloadFiles(ProjectAnalyzer $project_analyzer, Pr $autoload_files_files = array_unique($autoload_files_files); + $codebase = $project_analyzer->getCodebase(); + if ($autoload_files_files) { - $codebase = $project_analyzer->getCodebase(); $codebase->register_autoload_files = true; foreach ($autoload_files_files as $file_path) {