/*
* 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.
return;
}
- $ret = array();
+ $ret = [];
$ret[$this->getKindLabel($reflector)] = $methods;
return $ret;
{
$className = $reflector->getName();
- $methods = array();
+ $methods = [];
foreach ($reflector->getMethods() as $name => $method) {
if ($noInherit && $method->getDeclaringClass()->getName() !== $className) {
continue;
}
}
- // @todo switch to ksort after we drop support for 5.3:
- // ksort($methods, SORT_NATURAL | SORT_FLAG_CASE);
- uksort($methods, 'strnatcasecmp');
+ ksort($methods, SORT_NATURAL | SORT_FLAG_CASE);
return $methods;
}
protected function prepareMethods(array $methods)
{
// My kingdom for a generator.
- $ret = array();
+ $ret = [];
foreach ($methods as $name => $method) {
if ($this->showItem($name)) {
- $ret[$name] = array(
+ $ret[$name] = [
'name' => $name,
'style' => $this->getVisibilityStyle($method),
'value' => $this->presentSignature($method),
- );
+ ];
}
}