Code Duplication    Length = 12-14 lines in 2 locations

src/Services/BackpackBaseConfigService.php 1 location

@@ 35-48 (lines=14) @@
32
        $this->defaults= collect(collect($this->command->getDefaults('config'))->get('backpack_base'));
33
    }
34
35
    public function perform()
36
    {
37
        if (file_exists($this->file) === false) {
38
            $this->command->error('You don\'t have a the backpack base config file.');
39
            return false;
40
        }
41
42
        $this->command->info('Please provide your base config values:');
43
44
        $this->applyValues();
45
46
        //$user_model_fqn
47
        return true;
48
    }
49
50
    protected function escape($value)
51
    {

src/Services/EnvService.php 1 location

@@ 30-41 (lines=12) @@
27
        $this->defaults = $this->command->getDefaults('env');
28
    }
29
30
    public function perform()
31
    {
32
        if (file_exists($this->file) === false) {
33
            $this->command->error('You don\'t have a <comment>.env</comment> file.');
34
            return false;
35
        }
36
37
        $this->command->info('Values for <comment>.env</comment>');
38
        $this->applyValues();
39
40
        return true;
41
    }
42
43
    protected function old($key)
44
    {