Mercurial > hg > isophonics-drupal-site
comparison vendor/psy/psysh/src/Psy/TabCompletion/Matcher/FunctionsMatcher.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
25 */ | 25 */ |
26 public function getMatches(array $tokens, array $info = array()) | 26 public function getMatches(array $tokens, array $info = array()) |
27 { | 27 { |
28 $func = $this->getInput($tokens); | 28 $func = $this->getInput($tokens); |
29 | 29 |
30 $functions = get_defined_functions(); | 30 $functions = get_defined_functions(); |
31 $allFunctions = array_merge($functions['user'], $functions['internal']); | 31 $allFunctions = array_merge($functions['user'], $functions['internal']); |
32 | 32 |
33 return array_filter($allFunctions, function ($function) use ($func) { | 33 return array_filter($allFunctions, function ($function) use ($func) { |
34 return AbstractMatcher::startsWith($func, $function); | 34 return AbstractMatcher::startsWith($func, $function); |
35 }); | 35 }); |
38 /** | 38 /** |
39 * {@inheritdoc} | 39 * {@inheritdoc} |
40 */ | 40 */ |
41 public function hasMatched(array $tokens) | 41 public function hasMatched(array $tokens) |
42 { | 42 { |
43 $token = array_pop($tokens); | 43 $token = array_pop($tokens); |
44 $prevToken = array_pop($tokens); | 44 $prevToken = array_pop($tokens); |
45 | 45 |
46 switch (true) { | 46 switch (true) { |
47 case self::tokenIs($prevToken, self::T_NEW): | 47 case self::tokenIs($prevToken, self::T_NEW): |
48 return false; | 48 return false; |