PublishCommand::handle()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
cc 2
nc 2
nop 0
crap 6
1
<?php namespace Arcanesoft\Foundation\Console;
2
3
use Arcanesoft\Foundation\FoundationServiceProvider;
4
5
/**
6
 * Class     PublishCommand
7
 *
8
 * @package  Arcanesoft\Foundation\Console
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class PublishCommand extends Command
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * The name and signature of the console command.
20
     *
21
     * @var string
22
     */
23
    protected $signature = 'foundation:publish';
24
25
    /**
26
     * The console command description.
27
     *
28
     * @var string
29
     */
30
    protected $description = 'Publish foundation config, assets and other stuff.';
31
32
    /* -----------------------------------------------------------------
33
     |  Main Methods
34
     | -----------------------------------------------------------------
35
     */
36
37
    /**
38
     * Execute the console command.
39
     */
40
    public function handle()
41
    {
42
        $this->call('vendor:publish', ['--provider' => FoundationServiceProvider::class]);
43
44
        foreach ($this->config()->get('arcanesoft.foundation.modules.commands.publish', []) as $command) {
45
            $this->call($command);
46
        }
47
    }
48
}
49