Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Commit 0305d4d

Browse files
ElorfinLaurentGruber
authored andcommitted
removes deprecated composer type hint (#2507)
1 parent 8c0a1dd commit 0305d4d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

main/core/Library/Installation/Refresher.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111

1212
namespace Claroline\CoreBundle\Library\Installation;
1313

14-
use Composer\Script\CommandEvent;
15-
use Symfony\Component\DependencyInjection\ContainerInterface;
16-
use Symfony\Component\Console\Output\OutputInterface;
17-
use Symfony\Component\Console\Input\ArrayInput;
18-
use Symfony\Component\Console\Output\NullOutput;
19-
use Symfony\Component\Console\Input\InputOption;
20-
use Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand;
21-
use Symfony\Bundle\AsseticBundle\Command\DumpCommand;
22-
use JMS\DiExtraBundle\Annotation as DI;
2314
use Bazinga\Bundle\JsTranslationBundle\Command\DumpCommand as TranslationDumpCommand;
2415
use Claroline\CoreBundle\Library\Utilities\FileSystem;
16+
use Composer\Script\Event;
17+
use JMS\DiExtraBundle\Annotation as DI;
18+
use Symfony\Bundle\AsseticBundle\Command\DumpCommand;
19+
use Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand;
20+
use Symfony\Component\Console\Input\ArrayInput;
21+
use Symfony\Component\Console\Input\InputOption;
22+
use Symfony\Component\Console\Output\NullOutput;
23+
use Symfony\Component\Console\Output\OutputInterface;
24+
use Symfony\Component\DependencyInjection\ContainerInterface;
2525

2626
/**
2727
* @DI\Service("claroline.installation.refresher")
@@ -59,7 +59,7 @@ public function refresh($environment, $clearCache = true)
5959
public function installAssets()
6060
{
6161
$webDir = "{$this->container->get('kernel')->getRootDir()}/../web";
62-
$args = array('target' => $webDir);
62+
$args = ['target' => $webDir];
6363
$assetInstallCmd = new AssetsInstallCommand();
6464
$assetInstallCmd->setContainer($this->container);
6565
$assetInstallCmd->run(new ArrayInput($args), $this->output ?: new NullOutput());
@@ -72,7 +72,7 @@ public function dumpAssets($environment)
7272
}
7373
$translationDumpCommand = new TranslationDumpCommand();
7474
$translationDumpCommand->setContainer($this->container);
75-
$translationDumpCommand->run(new ArrayInput(array()), $this->output ?: new NullOutput());
75+
$translationDumpCommand->run(new ArrayInput([]), $this->output ?: new NullOutput());
7676
if ($this->output) {
7777
$this->output->writeln('Compiling javascripts...');
7878
}
@@ -81,7 +81,7 @@ public function dumpAssets($environment)
8181
$assetDumpCmd->getDefinition()->addOption(
8282
new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'Env', $environment)
8383
);
84-
$assetDumpCmd->run(new ArrayInput(array()), $this->output ?: new NullOutput());
84+
$assetDumpCmd->run(new ArrayInput([]), $this->output ?: new NullOutput());
8585
}
8686

8787
public function clearCache($environment = null)
@@ -95,10 +95,10 @@ public function clearCache($environment = null)
9595
static::removeContentFrom($cacheDir);
9696
}
9797

98-
public static function deleteCache(CommandEvent $event)
98+
public static function deleteCache(Event $event)
9999
{
100100
$options = array_merge(
101-
array('symfony-app-dir' => 'app'),
101+
['symfony-app-dir' => 'app'],
102102
$event->getComposer()->getPackage()->getExtra()
103103
);
104104

0 commit comments

Comments
 (0)