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

LangJsCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 21 2
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