/*
* This file is part of Psy Shell.
*
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class KeywordsMatcher extends AbstractMatcher
{
- protected $keywords = array(
+ protected $keywords = [
'array', 'clone', 'declare', 'die', 'echo', 'empty', 'eval', 'exit', 'include',
'include_once', 'isset', 'list', 'print', 'require', 'require_once', 'unset',
- );
+ ];
- protected $mandatoryStartKeywords = array(
+ protected $mandatoryStartKeywords = [
'die', 'echo', 'print', 'unset',
- );
+ ];
/**
* Get all (completable) PHP keywords.
/**
* {@inheritdoc}
*/
- public function getMatches(array $tokens, array $info = array())
+ public function getMatches(array $tokens, array $info = [])
{
$input = $this->getInput($tokens);
$prevToken = array_pop($tokens);
switch (true) {
- case self::hasToken(array(self::T_OPEN_TAG, self::T_VARIABLE), $token):
+ case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token):
// case is_string($token) && $token === '$':
- case self::hasToken(array(self::T_OPEN_TAG, self::T_VARIABLE), $prevToken) &&
+ case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $prevToken) &&
self::tokenIs($token, self::T_STRING):
case self::isOperator($token):
return true;