Passed
Push — main ( 5713ab...156ba4 )
by Andrey
55:20 queued 52:20
created

Missing   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
c 1
b 0
f 0
dl 0
loc 18
ccs 3
cts 6
cp 0.5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 2
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console\Helpers;
4
5
use Helldar\LaravelLangPublisher\Support\Missing as MissingSupport;
6
use Illuminate\Console\Command;
7
8
class Missing extends Command
9
{
10
    protected $signature = 'lang:missing';
11
12
    protected $description = 'Helps identify missing localizations for publication.';
13
14
    protected $hidden = true;
15
16 1
    public function handle(MissingSupport $missing)
17
    {
18 1
        if ($locales = $missing->get()) {
19
            $this->warn('We found the following localizations unavailable for installation:');
20
            $this->warn(implode(', ', $locales));
21
22
            return;
23
        }
24
25 1
        $this->info('Congratulations! All localizations are available!');
26 1
    }
27
}
28