Status   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 16
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 3
1
<?php
2
3
namespace Nikaia\TranslationSheet\Commands;
4
5
use Illuminate\Console\Command;
6
use Nikaia\TranslationSheet\Sheet\TranslationsSheet;
7
8
class Status extends Command
9
{
10
    protected $signature = 'translation_sheet:status';
11
12
    protected $description = 'Display the status of translations : Locked / Unlocked.';
13
14
    public function handle(TranslationsSheet $translationsSheet)
15
    {
16
        $locked = $translationsSheet->isTranslationsLocked();
17
18
        $label = $locked ? 'LOCKED' : 'UNLOCKED';
19
        $style = $locked ? 'error' : 'info';
20
21
        $this->line("Translations area is <$style>$label</$style>");
22
    }
23
}
24