Persister::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Satis\ConfigPersister;
6
use Illuminate\Console\Command;
7
8
class Persister extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'satis:persister:unlock';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Forcefully unlocks UI.';
23
24
    /** @var ConfigPersister $configPersister */
25
    protected $configPersister;
26
27
    /**
28
     * Create a new command instance.
29
     *
30
     * @param \App\Satis\ConfigPersister $configPersister
31
     * @internal param \Illuminate\Filesystem\Filesystem $filesystem
32
     */
33
    public function __construct(ConfigPersister $configPersister) {
34
        parent::__construct();
35
36
        $this->configPersister = $configPersister;
37
    }
38
39
    /**
40
     * Execute the console command.
41
     *
42
     * @return void
43
     */
44
    public function handle() {
45
        $this->info('Unlocking UI.');
46
47
        $this->configPersister->unlock();
48
    }
49
}
50