From 6b04503cc4010a3050e8c09f9218e31b1eb3615c Mon Sep 17 00:00:00 2001 From: Brown Date: Thu, 16 May 2019 13:32:10 -0400 Subject: [PATCH] Fix #1646 - reload functions from cache when not already stubbed --- src/Psalm/Internal/Codebase/Scanner.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Psalm/Internal/Codebase/Scanner.php b/src/Psalm/Internal/Codebase/Scanner.php index ba1ee0cf16d..406818fb9bf 100644 --- a/src/Psalm/Internal/Codebase/Scanner.php +++ b/src/Psalm/Internal/Codebase/Scanner.php @@ -632,9 +632,7 @@ private function scanFile( if ($this->codebase->register_autoload_files) { foreach ($file_storage->functions as $function_storage) { - if ($this->codebase->register_stub_files - || $this->codebase->functions->hasStubbedFunction($function_storage->cased_name) - ) { + if (!$this->codebase->functions->hasStubbedFunction($function_storage->cased_name)) { $this->codebase->functions->addGlobalFunction($function_storage->cased_name, $function_storage); } }