Security update for Core, with self-updated composer
[yaffs-website] / vendor / psy / psysh / src / Psy / TabCompletion / Matcher / ClassAttributesMatcher.php
index 4695f578a6ef34ec2de21d316b0a5b5a0651d413..2635b10dbca6d2ae4835245584aa95d99e1c45d1 100644 (file)
@@ -36,7 +36,12 @@ class ClassAttributesMatcher extends AbstractMatcher
 
         $class = $this->getNamespaceAndClass($tokens);
 
-        $reflection = new \ReflectionClass($class);
+        try {
+            $reflection = new \ReflectionClass($class);
+        } catch (\ReflectionException $re) {
+            return array();
+        }
+
         $vars = array_merge(
             array_map(
                 function ($var) {
@@ -65,7 +70,7 @@ class ClassAttributesMatcher extends AbstractMatcher
      */
     public function hasMatched(array $tokens)
     {
-        $token = array_pop($tokens);
+        $token     = array_pop($tokens);
         $prevToken = array_pop($tokens);
 
         switch (true) {