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