MakeSocial::handle()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.6666
cc 2
eloc 6
nc 2
nop 0
crap 6
1
<?php
2
3
namespace Acacha\LaravelSocial\Console\Commands;
4
5
use Acacha\LaravelSocial\Contracts\ConfigureSocialServicesFactory;
6
use Illuminate\Console\Command;
7
8
/**
9
 * Class MakeSocial.
10
 *
11
 * @package Acacha\Social\Console\Commands
12
 */
13
class MakeSocial extends Command
14
{
15
    /**
16
     * The name and signature of the console command.
17
     *
18
     * @var string
19
     */
20
    protected $signature = 'make:social';
21
22
    /**
23
     * The console command description.
24
     *
25
     * @var string
26
     */
27
    protected $description = 'Add Oauth social login/register to your Laravel app using Socialite';
28
29
    /**
30
     * Execute the console command.
31
     *
32
     * @return mixed
33
     */
34
    public function handle()
35
    {
36
        $this->info('Laravel social package has added some migration files. Your migrations status is:');
37
        $this->call('migrate:status');
38
        if ($this->confirm('Do you want to run migrations?')) {
39
            $this->call('migrate');
40
        }
41
        $this->call('acacha:social');
42
    }
43
}
44