Code Duplication    Length = 15-15 lines in 2 locations

src/Commands/RouteProviderMakeCommand.php 1 location

@@ 55-69 (lines=15) @@
52
     *
53
     * @return string
54
     */
55
    protected function getTemplateContents()
56
    {
57
        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
58
59
        return (new Stub('/route-provider.stub', [
60
            'NAMESPACE'            => $this->getClassNamespace($module),
61
            'CLASS'                => $this->getFileName(),
62
            'MODULE_NAMESPACE'     => $this->laravel['modules']->config('namespace'),
63
            'MODULE'               => $this->getModuleName(),
64
            'CONTROLLER_NAMESPACE' => $this->getControllerNameSpace(),
65
            'WEB_ROUTES_PATH'      => $this->getWebRoutesPath(),
66
            'API_ROUTES_PATH'      => $this->getApiRoutesPath(),
67
            'LOWER_NAME'           => $module->getLowerName(),
68
        ]))->render();
69
    }
70
71
    /**
72
     * @return string

src/Commands/ModelMakeCommand.php 1 location

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