Code Duplication    Length = 3-3 lines in 2 locations

src/Generators/ModuleGenerator.php 2 locations

@@ 305-307 (lines=3) @@
302
        foreach ($this->getFiles() as $stub => $file) {
303
            $path = $this->module->getModulePath($this->getName()) . $file;
304
305
            if (!$this->filesystem->isDirectory($dir = dirname($path))) {
306
                $this->filesystem->makeDirectory($dir, 0775, true);
307
            }
308
309
            $this->filesystem->put($path, $this->getStubContents($stub));
310
@@ 399-401 (lines=3) @@
396
    {
397
        $path = $this->module->getModulePath($this->getName()) . 'module.json';
398
399
        if (!$this->filesystem->isDirectory($dir = dirname($path))) {
400
            $this->filesystem->makeDirectory($dir, 0775, true);
401
        }
402
403
        $this->filesystem->put($path, $this->getStubContents('json'));
404