Commit 38a76a90 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #2778 from AlessandroMinoccheri/fix_array_declarations_in_tools_dir

fixed array declarations inside tools directory
parents 90cf171c 0344c7b9
......@@ -70,11 +70,11 @@ class ReservedWordsCommand extends Command
$this
->setName('dbal:reserved-words')
->setDescription('Checks if the current database contains identifiers that are reserved.')
->setDefinition(array(
->setDefinition([
new InputOption(
'list', 'l', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Keyword-List name.'
)
))
])
->setHelp(<<<EOT
Checks if the current database contains tables and columns
with names that are identifiers in this dialect or in other SQL dialects.
......@@ -138,7 +138,7 @@ EOT
);
}
$keywords = array();
$keywords = [];
foreach ($keywordLists as $keywordList) {
if (!isset($this->keywordListClasses[$keywordList])) {
throw new \InvalidArgumentException(
......
......@@ -46,11 +46,11 @@ class RunSqlCommand extends Command
$this
->setName('dbal:run-sql')
->setDescription('Executes arbitrary SQL directly from the command line.')
->setDefinition(array(
->setDefinition([
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('force-fetch', null, InputOption::VALUE_NONE, 'Forces fetching the result.'),
))
])
->setHelp(<<<EOT
Executes arbitrary SQL directly from the command line.
EOT
......
......@@ -42,9 +42,9 @@ class ConsoleRunner
*/
static public function createHelperSet(Connection $connection)
{
return new HelperSet(array(
return new HelperSet([
'db' => new ConnectionHelper($connection)
));
]);
}
/**
......@@ -55,7 +55,7 @@ class ConsoleRunner
*
* @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);
......@@ -75,11 +75,11 @@ class ConsoleRunner
*/
static public function addCommands(Application $cli)
{
$cli->addCommands(array(
$cli->addCommands([
new RunSqlCommand(),
new ImportCommand(),
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