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