Code Duplication    Length = 3-7 lines in 2 locations

src/Commands/SetupCommand.php 1 location

@@ 67-73 (lines=7) @@
64
     */
65
    protected function generateDirectory($dir, $success, $error) : int
66
    {
67
        if (!$this->laravel['files']->isDirectory($dir)) {
68
            $this->laravel['files']->makeDirectory($dir, 0755, true, true);
69
70
            $this->info($success);
71
72
            return 0;
73
        }
74
75
        $this->error($error);
76

src/Commands/GeneratorCommand.php 1 location

@@ 52-54 (lines=3) @@
49
50
        $path = str_replace('\\', '/', $this->getDestinationFilePath());
51
52
        if (!$this->laravel['files']->isDirectory($dir = dirname($path))) {
53
            $this->laravel['files']->makeDirectory($dir, 0777, true);
54
        }
55
56
        $contents = $this->getTemplateContents();
57