/*
* 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 DocblockFormatter implements Formatter
{
- private static $vectorParamTemplates = array(
+ private static $vectorParamTemplates = [
'type' => 'info',
'var' => 'strong',
- );
+ ];
/**
* Format a docblock.
public static function format(\Reflector $reflector)
{
$docblock = new Docblock($reflector);
- $chunks = array();
+ $chunks = [];
if (!empty($docblock->desc)) {
$chunks[] = '<comment>Description:</comment>';
*/
private static function formatVector(array $vector, array $lines)
{
- $template = array(' ');
+ $template = [' '];
foreach ($vector as $type) {
$max = 0;
foreach ($lines as $line) {
$template = implode(' ', $template);
return implode("\n", array_map(function ($line) use ($template) {
- $escaped = array_map(array('Symfony\Component\Console\Formatter\OutputFormatter', 'escape'), $line);
+ $escaped = array_map(['Symfony\Component\Console\Formatter\OutputFormatter', 'escape'], $line);
return rtrim(vsprintf($template, $escaped));
}, $lines));
*/
private static function formatTags(array $skip, array $tags)
{
- $chunks = array();
+ $chunks = [];
foreach ($tags as $name => $values) {
if (in_array($name, $skip)) {