Commit 0344c7b9 authored by Alessandro Minoccheri's avatar Alessandro Minoccheri

fixed array declarations inside tools directory

parent 5c5966aa
...@@ -70,11 +70,11 @@ class ReservedWordsCommand extends Command ...@@ -70,11 +70,11 @@ class ReservedWordsCommand extends Command
$this $this
->setName('dbal:reserved-words') ->setName('dbal:reserved-words')
->setDescription('Checks if the current database contains identifiers that are reserved.') ->setDescription('Checks if the current database contains identifiers that are reserved.')
->setDefinition(array( ->setDefinition([
new InputOption( new InputOption(
'list', 'l', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Keyword-List name.' 'list', 'l', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Keyword-List name.'
) )
)) ])
->setHelp(<<<EOT ->setHelp(<<<EOT
Checks if the current database contains tables and columns Checks if the current database contains tables and columns
with names that are identifiers in this dialect or in other SQL dialects. with names that are identifiers in this dialect or in other SQL dialects.
...@@ -138,7 +138,7 @@ EOT ...@@ -138,7 +138,7 @@ EOT
); );
} }
$keywords = array(); $keywords = [];
foreach ($keywordLists as $keywordList) { foreach ($keywordLists as $keywordList) {
if (!isset($this->keywordListClasses[$keywordList])) { if (!isset($this->keywordListClasses[$keywordList])) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
......
...@@ -46,11 +46,11 @@ class RunSqlCommand extends Command ...@@ -46,11 +46,11 @@ class RunSqlCommand extends Command
$this $this
->setName('dbal:run-sql') ->setName('dbal:run-sql')
->setDescription('Executes arbitrary SQL directly from the command line.') ->setDescription('Executes arbitrary SQL directly from the command line.')
->setDefinition(array( ->setDefinition([
new InputArgument('sql', InputArgument::REQUIRED, 'The SQL statement to execute.'), new InputArgument('sql', InputArgument::REQUIRED, 'The SQL statement to execute.'),
new InputOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of result set.', 7), new InputOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of result set.', 7),
new InputOption('force-fetch', null, InputOption::VALUE_NONE, 'Forces fetching the result.'), new InputOption('force-fetch', null, InputOption::VALUE_NONE, 'Forces fetching the result.'),
)) ])
->setHelp(<<<EOT ->setHelp(<<<EOT
Executes arbitrary SQL directly from the command line. Executes arbitrary SQL directly from the command line.
EOT EOT
......
...@@ -42,9 +42,9 @@ class ConsoleRunner ...@@ -42,9 +42,9 @@ class ConsoleRunner
*/ */
static public function createHelperSet(Connection $connection) static public function createHelperSet(Connection $connection)
{ {
return new HelperSet(array( return new HelperSet([
'db' => new ConnectionHelper($connection) 'db' => new ConnectionHelper($connection)
)); ]);
} }
/** /**
...@@ -55,7 +55,7 @@ class ConsoleRunner ...@@ -55,7 +55,7 @@ class ConsoleRunner
* *
* @return void * @return void
*/ */
static public function run(HelperSet $helperSet, $commands = array()) static public function run(HelperSet $helperSet, $commands = [])
{ {
$cli = new Application('Doctrine Command Line Interface', Version::VERSION); $cli = new Application('Doctrine Command Line Interface', Version::VERSION);
...@@ -75,11 +75,11 @@ class ConsoleRunner ...@@ -75,11 +75,11 @@ class ConsoleRunner
*/ */
static public function addCommands(Application $cli) static public function addCommands(Application $cli)
{ {
$cli->addCommands(array( $cli->addCommands([
new RunSqlCommand(), new RunSqlCommand(),
new ImportCommand(), new ImportCommand(),
new ReservedWordsCommand(), new ReservedWordsCommand(),
)); ]);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment