Passed
Push — master ( b74962...219f1c )
by Ivan
04:39
created

DisableStageFront::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace CodeZero\StageFront\Commands;
4
5
use CodeZero\DotEnvUpdater\DotEnvUpdater;
6
use Illuminate\Console\Command;
7
8
class DisableStageFront extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'stagefront:disable';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Update the .env file to disable StageFront.';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @param \CodeZero\DotEnvUpdater\DotEnvUpdater $updater
28
     *
29
     * @return void
30
     */
31 1
    public function handle(DotEnvUpdater $updater)
32
    {
33 1
        $updater->set('STAGEFRONT_ENABLED', false);
34
35 1
        $this->info("StageFront has been disabled.");
36 1
    }
37
}
38