Passed
Branch master (238831)
by Quetzy
07:17
created

InstallCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 11 1
1
<?php
2
/**
3
 * This file is part of the Laravel Auditing package.
4
 *
5
 * @author     Antério Vieira <[email protected]>
6
 * @author     Quetzy Garcia  <[email protected]>
7
 * @author     Raphael França <[email protected]>
8
 * @copyright  2015-2018
9
 *
10
 * For the full copyright and license information,
11
 * please view the LICENSE.md file that was distributed
12
 * with this source code.
13
 */
14
15
namespace OwenIt\Auditing\Console;
16
17
use Illuminate\Console\Command;
18
use Illuminate\Support\Facades\Artisan;
19
use OwenIt\Auditing\AuditingServiceProvider;
20
21
class InstallCommand extends Command
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected $name = 'auditing:install';
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected $description = 'Install the Laravel Auditing package';
32
33
    /**
34
     * Execute the console command.
35
     *
36
     * @return void
37
     */
38 3
    public function handle()
39
    {
40 3
        $this->info('Publishing the config files');
41 3
        Artisan::call('vendor:publish', [
42 3
            '--provider' => AuditingServiceProvider::class,
43
        ]);
44
45 3
        $this->info('Publishing the migration file');
46 3
        Artisan::call('auditing:table');
47
48 3
        $this->info('Successfully installed Laravel Auditing! Enjoy :)');
49 3
    }
50
}
51