Conditions | 4 |
Paths | 8 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 4.0072 |
Changes | 0 |
1 | <?php |
||
32 | 1 | public function handle(Filesystem $filesystem, AddonEnvironment $env) |
|
33 | { |
||
34 | // make addons/ |
||
35 | 1 | $addonsDirectory = $env->path(); |
|
36 | 1 | if (!$filesystem->exists($addonsDirectory)) { |
|
37 | $filesystem->makeDirectory($addonsDirectory); |
||
38 | } |
||
39 | |||
40 | // copy app/config/addon.php |
||
41 | 1 | $addonConfigSourceFile = __DIR__.'/../../config/addon.php'; |
|
42 | 1 | $addonConfigFile = $this->laravel['path.config'].'/addon.php'; |
|
43 | 1 | if (!$filesystem->exists($addonConfigFile)) { |
|
44 | 1 | $filesystem->copy($addonConfigSourceFile, $addonConfigFile); |
|
45 | |||
46 | 1 | $this->info('make config: '.$addonConfigFile); |
|
47 | } |
||
48 | |||
49 | // show lists |
||
50 | 1 | $addons = $env->addons(); |
|
51 | 1 | foreach ($addons as $addon) { |
|
52 | 1 | $this->dump($addon); |
|
53 | } |
||
54 | 1 | } |
|
55 | |||
63 |