From 6ab69a7dc9a2a3e302b4a37d16877eb781111cde Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sun, 13 Aug 2017 21:58:00 +0200 Subject: [PATCH] [cs] apply short array to bin/php-parse --- bin/php-parse | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/php-parse b/bin/php-parse index ea75dad..2e237dc 100755 --- a/bin/php-parse +++ b/bin/php-parse @@ -26,9 +26,9 @@ if (empty($files)) { showHelp("Must specify at least one file."); } -$lexer = new PhpParser\Lexer\Emulative(array('usedAttributes' => array( +$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -))); +]]); $parser = (new PhpParser\ParserFactory)->create( PhpParser\ParserFactory::PREFER_PHP7, $lexer @@ -130,13 +130,13 @@ OUTPUT } function parseArgs($args) { - $operations = array(); - $files = array(); - $attributes = array( + $operations = []; + $files = []; + $attributes = [ 'with-column-info' => false, 'with-positions' => false, 'with-recovery' => false, - ); + ]; array_shift($args); $parseOptions = true; @@ -193,5 +193,5 @@ function parseArgs($args) { } } - return array($operations, $files, $attributes); + return [$operations, $files, $attributes]; }