From dfa7078937e686ed3d49d0211c5a92d33c32c233 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sat, 30 Apr 2016 17:31:49 -0400 Subject: [PATCH] Register all variables even if not checking --- src/CodeInspector/StatementsChecker.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CodeInspector/StatementsChecker.php b/src/CodeInspector/StatementsChecker.php index b566aceb0..23be203df 100644 --- a/src/CodeInspector/StatementsChecker.php +++ b/src/CodeInspector/StatementsChecker.php @@ -778,6 +778,13 @@ class StatementsChecker } if (!$this->_check_variables) { + $stmt->returnType = 'mixed'; + + if (is_string($stmt->name)) { + $vars_in_scope[$stmt->name] = 'mixed'; + $vars_possibly_in_scope[$stmt->name] = true; + } + return; }