11
11
12
12
namespace Claroline \CoreBundle \Library \Installation ;
13
13
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 ;
23
14
use Bazinga \Bundle \JsTranslationBundle \Command \DumpCommand as TranslationDumpCommand ;
24
15
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 ;
25
25
26
26
/**
27
27
* @DI\Service("claroline.installation.refresher")
@@ -59,7 +59,7 @@ public function refresh($environment, $clearCache = true)
59
59
public function installAssets ()
60
60
{
61
61
$ webDir = "{$ this ->container ->get ('kernel ' )->getRootDir ()}/../web " ;
62
- $ args = array ( 'target ' => $ webDir) ;
62
+ $ args = [ 'target ' => $ webDir] ;
63
63
$ assetInstallCmd = new AssetsInstallCommand ();
64
64
$ assetInstallCmd ->setContainer ($ this ->container );
65
65
$ assetInstallCmd ->run (new ArrayInput ($ args ), $ this ->output ?: new NullOutput ());
@@ -72,7 +72,7 @@ public function dumpAssets($environment)
72
72
}
73
73
$ translationDumpCommand = new TranslationDumpCommand ();
74
74
$ translationDumpCommand ->setContainer ($ this ->container );
75
- $ translationDumpCommand ->run (new ArrayInput (array () ), $ this ->output ?: new NullOutput ());
75
+ $ translationDumpCommand ->run (new ArrayInput ([] ), $ this ->output ?: new NullOutput ());
76
76
if ($ this ->output ) {
77
77
$ this ->output ->writeln ('Compiling javascripts... ' );
78
78
}
@@ -81,7 +81,7 @@ public function dumpAssets($environment)
81
81
$ assetDumpCmd ->getDefinition ()->addOption (
82
82
new InputOption ('--env ' , '-e ' , InputOption::VALUE_REQUIRED , 'Env ' , $ environment )
83
83
);
84
- $ assetDumpCmd ->run (new ArrayInput (array () ), $ this ->output ?: new NullOutput ());
84
+ $ assetDumpCmd ->run (new ArrayInput ([] ), $ this ->output ?: new NullOutput ());
85
85
}
86
86
87
87
public function clearCache ($ environment = null )
@@ -95,10 +95,10 @@ public function clearCache($environment = null)
95
95
static ::removeContentFrom ($ cacheDir );
96
96
}
97
97
98
- public static function deleteCache (CommandEvent $ event )
98
+ public static function deleteCache (Event $ event )
99
99
{
100
100
$ options = array_merge (
101
- array ( 'symfony-app-dir ' => 'app ' ) ,
101
+ [ 'symfony-app-dir ' => 'app ' ] ,
102
102
$ event ->getComposer ()->getPackage ()->getExtra ()
103
103
);
104
104
0 commit comments