LarrockUpdateVendorConfigCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 4
Bugs 2 Features 1
Metric Value
eloc 14
c 4
b 2
f 1
dl 0
loc 37
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 16 1
1
<?php
2
3
namespace Larrock\Core\Commands;
4
5
use Illuminate\Console\Command;
6
7
class LarrockUpdateVendorConfigCommand extends Command
8
{
9
    /**
10
     * The name and signature of the console command.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'larrock:updateVendorConfig';
15
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Update vendor configs';
22
23
    /**
24
     * Execute the console command.
25
     *
26
     * @return mixed
27
     */
28
    public function handle()
29
    {
30
        $this->line('=== Update vendor configs ===');
31
32
        $dir = str_replace('/Commands', '', __DIR__);
33
34
        \File::copy($dir.'/../configVendor/auth.php', base_path('/config/auth.php'));
35
        \File::copy($dir.'/../configVendor/breadcrumbs.php', base_path('/config/breadcrumbs.php'));
36
        \File::copy($dir.'/../configVendor/filesystems.php', base_path('/config/filesystems.php'));
37
        \File::copy($dir.'/../configVendor/jsvalidation.php', base_path('/config/jsvalidation.php'));
38
        \File::copy($dir.'/../configVendor/medialibrary.php', base_path('/config/medialibrary.php'));
39
        \File::copy($dir.'/../configVendor/cart.php', base_path('/config/cart.php'));
40
        \File::copy($dir.'/../configVendor/database.php', base_path('/config/database.php'));
41
        \File::deleteDirectory(base_path('public'));
42
43
        $this->info('Configs successfully updated');
44
    }
45
}
46