Code Duplication    Length = 14-15 lines in 2 locations

src/Commands/ModelMakeCommand.php 1 location

@@ 106-120 (lines=15) @@
103
    /**
104
     * @return mixed
105
     */
106
    protected function getTemplateContents()
107
    {
108
        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
109
110
        return (new Stub('/model.stub', [
111
            'NAME'              => $this->getModelName(),
112
            'FILLABLE'          => $this->getFillable(),
113
            'NAMESPACE'         => $this->getClassNamespace($module),
114
            'CLASS'             => $this->getClass(),
115
            'LOWER_NAME'        => $module->getLowerName(),
116
            'MODULE'            => $this->getModuleName(),
117
            'STUDLY_NAME'       => $module->getStudlyName(),
118
            'MODULE_NAMESPACE'  => $this->laravel['modules']->config('namespace'),
119
        ]))->render();
120
    }
121
122
    /**
123
     * @return mixed

src/Commands/RouteProviderMakeCommand.php 1 location

@@ 47-60 (lines=14) @@
44
     *
45
     * @return string
46
     */
47
    protected function getTemplateContents()
48
    {
49
        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
50
51
        return (new Stub('/route-provider.stub', [
52
            'NAMESPACE'        => $this->getClassNamespace($module),
53
            'CLASS'            => $this->getFileName(),
54
            'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'),
55
            'MODULE'           => $this->getModuleName(),
56
            'WEB_ROUTES_PATH'  => $this->getWebRoutesPath(),
57
            'API_ROUTES_PATH'  => $this->getApiRoutesPath(),
58
            'LOWER_NAME'       => $module->getLowerName(),
59
        ]))->render();
60
    }
61
62
    /**
63
     * @return string