GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( c1fc94...14aa9d )
by Nikhil
09:34
created

Init::handle()   B

Complexity

Conditions 3
Paths 4

Size

Total Lines 28
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 28
rs 8.8571
cc 3
eloc 19
nc 4
nop 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\User;
6
use Artisan;
7
use Illuminate\Console\Command;
8
9
class Init extends Command
10
{
11
    /**
12
     * The name and signature of the console command.
13
     *
14
     * @var string
15
     */
16
    protected $signature = 'shop:init';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Install the application.';
24
25
    /**
26
     * Execute the console command.
27
     *
28
     * @return mixed
29
     */
30
    public function handle()
31
    {
32
        $this->info('Starting Installation...');
33
34
        if ( ! env('APP_KEY')) {
35
            $this->info('Generating app key');
36
            Artisan::call('key:generate');
37
        } else {
38
            $this->comment('Skipping - App key exists');
39
        }
40
41
        $this->info('Migrating database');
42
        Artisan::call('migrate', ['--force' => true]);
43
44
        if ( ! User::count()) {
45
            $this->info('Seeding initial data');
46
            Artisan::call('db:seed', ['--force' => true]);
47
        } else {
48
            $this->comment('Skipping - Data already seeded');
49
        }
50
51
        $this->info('Executing npm install and gulp');
52
        system('npm install');
53
54
        $this->comment("\nSuccess! You can now run the application");
55
        $this->comment('Again, for more help refer to');
56
        $this->info('https://github.com/nikhil-pandey/guitar-shop');
57
    }
58
}
59