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

EnableStageFront   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 30
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace CodeZero\StageFront\Commands;
4
5
use CodeZero\DotEnvUpdater\DotEnvUpdater;
6
use Illuminate\Console\Command;
7
8
class EnableStageFront extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'stagefront:enable';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Update the .env file to enable 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', true);
34
35 1
        $this->info("StageFront has been enabled.");
36 1
    }
37
}
38