/*
* 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.
$internal = $input->getOption('internal');
$category = $input->getOption('category');
- $ret = array();
+ $ret = [];
if ($user) {
$ret['User Constants'] = $this->getConstants('user');
$ret['Constants'] = $this->getConstants();
}
- return array_map(array($this, 'prepareConstants'), array_filter($ret));
+ return array_map([$this, 'prepareConstants'], array_filter($ret));
}
/**
return call_user_func_array('array_merge', $consts);
}
- return isset($consts[$category]) ? $consts[$category] : array();
+ return isset($consts[$category]) ? $consts[$category] : [];
}
/**
protected function prepareConstants(array $constants)
{
// My kingdom for a generator.
- $ret = array();
+ $ret = [];
$names = array_keys($constants);
natcasesort($names);
foreach ($names as $name) {
if ($this->showItem($name)) {
- $ret[$name] = array(
+ $ret[$name] = [
'name' => $name,
'style' => self::IS_CONSTANT,
'value' => $this->presentRef($constants[$name]),
- );
+ ];
}
}