X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FTabCompletion%2FMatcher%2FClassMethodsMatcher.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FTabCompletion%2FMatcher%2FClassMethodsMatcher.php;h=fa734fde981aece68588eaa69eb43ec7a8f1d120;hp=6045ed94e32119f6b7c8399f7bebc79a50319867;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php b/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php index 6045ed94e..fa734fde9 100644 --- a/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php +++ b/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php @@ -36,7 +36,12 @@ class ClassMethodsMatcher extends AbstractMatcher $class = $this->getNamespaceAndClass($tokens); - $reflection = new \ReflectionClass($class); + try { + $reflection = new \ReflectionClass($class); + } catch (\ReflectionException $re) { + return array(); + } + $methods = $reflection->getMethods(\ReflectionMethod::IS_STATIC); $methods = array_map(function (\ReflectionMethod $method) { return $method->getName(); @@ -57,7 +62,7 @@ class ClassMethodsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); + $token = array_pop($tokens); $prevToken = array_pop($tokens); switch (true) {