/*
* 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.
$user = $input->getOption('user');
$internal = $input->getOption('internal');
- $ret = array();
+ $ret = [];
// only list classes, interfaces and traits if we are specifically asked
$ret = array_merge($ret, $this->filterClasses('Traits', get_declared_traits(), $internal, $user));
}
- return array_map(array($this, 'prepareClasses'), array_filter($ret));
+ return array_map([$this, 'prepareClasses'], array_filter($ret));
}
/**
*/
protected function filterClasses($key, $classes, $internal, $user)
{
- $ret = array();
+ $ret = [];
if ($internal) {
$ret['Internal ' . $key] = array_filter($classes, function ($class) {
/**
* Prepare formatted class array.
*
- * @param array $class
+ * @param array $classes
*
* @return array
*/
natcasesort($classes);
// My kingdom for a generator.
- $ret = array();
+ $ret = [];
foreach ($classes as $name) {
if ($this->showItem($name)) {
- $ret[$name] = array(
+ $ret[$name] = [
'name' => $name,
'style' => self::IS_CLASS,
'value' => $this->presentSignature($name),
- );
+ ];
}
}