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

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