Use short array declaration

This commit is contained in:
Romain Neutron
2013-11-18 11:58:12 +01:00
parent 2898b317c4
commit 56b373ee6e
723 changed files with 8350 additions and 8352 deletions

View File

@@ -35,10 +35,10 @@ class module_console_systemTemplateGenerator extends Command
protected function doExecute(InputInterface $input, OutputInterface $output)
{
$tplDirs = array(
$tplDirs = [
realpath(__DIR__ . '/../../../../templates/web/'),
realpath(__DIR__ . '/../../../../templates/mobile/')
);
];
$n_ok = $n_error = 0;
@@ -48,9 +48,9 @@ class module_console_systemTemplateGenerator extends Command
$this->container['twig'];
foreach ($tplDirs as $tplDir) {
$this->container['twig.loader.filesystem']->setPaths(array($tplDir));
$this->container['twig.loader.filesystem']->setPaths([$tplDir]);
$finder = new Finder();
foreach ($finder->files()->in(array($tplDir)) as $file) {
foreach ($finder->files()->in([$tplDir]) as $file) {
try {
$this->container['twig']->loadTemplate(str_replace($tplDir, '', $file->getPathname()));
$output->writeln('' . $file . '');