mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
Use short array declaration
This commit is contained in:
@@ -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 . '');
|
||||
|
Reference in New Issue
Block a user