Completed
Push — master ( bb2006...f9b409 )
by Lukáš
03:10
created

MakeConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

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