Code Duplication    Length = 15-16 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

@@ 60-75 (lines=16) @@
57
     *
58
     * @return string
59
     */
60
    protected function getTemplateContents()
61
    {
62
        $stubFile = $this->option('api') ? '/api-route-provider.stub' : '/route-provider.stub';
63
64
        $module = $this->laravel['modules']->findOrFail($this->getModuleName());
65
66
        return (new Stub($stubFile, [
67
            'NAMESPACE'        => $this->getClassNamespace($module),
68
            'CLASS'            => $this->getFileName(),
69
            'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'),
70
            'MODULE'           => $this->getModuleName(),
71
            'WEB_ROUTES_PATH'  => $this->getWebRoutesPath(),
72
            'API_ROUTES_PATH'  => $this->getApiRoutesPath(),
73
            'LOWER_NAME'       => $module->getLowerName(),
74
        ]))->render();
75
    }
76
77
    /**
78
     * @return string