Code Duplication    Length = 12-14 lines in 2 locations

src/Generators/DatabaseModuleGenerator.php 1 location

@@ 135-148 (lines=14) @@
132
    /**
133
     * Generate the module.json file
134
     */
135
    private function generateModuleJsonFile()
136
    {
137
        $path = $this->module->getModulePath($this->getName()) . 'module.json';
138
139
        if (!$this->filesystem->isDirectory($dir = dirname($path))) {
140
            $this->filesystem->makeDirectory($dir, 0775, true);
141
        }
142
143
        $this->filesystem->put($path, $this->getStubContents('json'));
144
145
        if (!$this->silentOutput) {
146
            $this->console->info("Created : {$path}");
147
        }
148
    }
149
}
150

src/Generators/ModuleGenerator.php 1 location

@@ 466-477 (lines=12) @@
463
    /**
464
     * Generate the module.json file
465
     */
466
    private function generateModuleJsonFile()
467
    {
468
        $path = $this->module->getModulePath($this->getName()) . 'module.json';
469
470
        if (!$this->filesystem->isDirectory($dir = dirname($path))) {
471
            $this->filesystem->makeDirectory($dir, 0775, true);
472
        }
473
474
        $this->filesystem->put($path, $this->getStubContents('json'));
475
476
        $this->console->info("Created : {$path}");
477
    }
478
479
    /**
480
     * Remove the default service provider that was added in the module.json file