Completed
Push — master ( bab9dc...2e4827 )
by Abdelrahman
10:15 queued 08:43
created

LangJsCommand::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.584
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\Overrides\Mariuzzo\LaravelJsLocalization\Commands;
6
7
use Mariuzzo\LaravelJsLocalization\Commands\LangJsCommand as BaseLangJsCommand;
8
9
class LangJsCommand extends BaseLangJsCommand
10
{
11
    /**
12
     * Handle the command.
13
     */
14
    public function handle()
15
    {
16
        $this->line('');
17
        $target = $this->argument('target');
18
        $options = [
19
            'compress' => $this->option('compress'),
20
            'json' => $this->option('json'),
21
            'no-lib' => $this->option('no-lib'),
22
            'source' => $this->option('source'),
23
        ];
24
25
        if ($this->generator->generate($target, $options)) {
26
            $this->info("Created: {$target}");
27
            $this->line('');
28
29
            return;
30
        }
31
32
        $this->error("Could not create: {$target}");
33
        $this->line('');
34
    }
35
}
36