MakeConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 47
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A handle() 0 7 1
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Satis\ConfigManager;
6
use App\Satis\ConfigPersister;
7
use Illuminate\Console\Command;
8
9
class MakeConfig extends Command
10
{
11
    /**
12
     * The name and signature of the console command.
13
     *
14
     * @var string
15
     */
16
    protected $signature = 'satis:make:config';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Mannualy creates config mirrors.';
24
25
    /** @var ConfigManager $configManager */
26
    protected $configManager;
27
28
    /** @var ConfigPersister $configPersister */
29
    protected $configPersister;
30
31
    /**
32
     * Create a new command instance.
33
     *
34
     * @param ConfigManager $configManager
35
     * @internal param \Illuminate\Filesystem\Filesystem $filesystem
36
     */
37
    public function __construct(ConfigManager $configManager) {
38
        parent::__construct();
39
40
        $this->configManager = $configManager;
41
    }
42
43
    /**
44
     * Execute the console command.
45
     *
46
     * @return void
47
     */
48
    public function handle() {
49
        $this->info('Creating mirrored configuration files.');
50
51
        $this->configManager
52
            ->setDisableBuild(true)
53
            ->save();
54
    }
55
}
56