Code Duplication    Length = 15-15 lines in 3 locations

app/Console/Commands/MakeJsonApiDemo.php 3 locations

@@ 103-117 (lines=15) @@
100
    /**
101
     *
102
     */
103
    protected function exportControllers()
104
    {
105
        foreach ($this->controllers as $key => $value) {
106
            if (file_exists(app_path('Http/Controllers/Api/v1/'.$value)) && ! $this->option('force')) {
107
                if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
108
                    continue;
109
                }
110
            }
111
112
            copy(
113
                base_path('stubs/Controllers/'.$key),
114
                app_path('Http/Controllers/Api/v1/'.$value)
115
            );
116
        }
117
    }
118
119
    /**
120
     *
@@ 122-136 (lines=15) @@
119
    /**
120
     *
121
     */
122
    protected function exportModels()
123
    {
124
        foreach ($this->models as $key => $value) {
125
            if (file_exists(app_path('Models/'.$value)) && ! $this->option('force')) {
126
                if (! $this->confirm("The [{$value}] model already exists. Do you want to replace it?")) {
127
                    continue;
128
                }
129
            }
130
131
            copy(
132
                base_path('stubs/Models/'.$key),
133
                app_path('Models/'.$value)
134
            );
135
        }
136
    }
137
138
    /**
139
     *
@@ 161-175 (lines=15) @@
158
    /**
159
     *
160
     */
161
    protected function exportSeeds()
162
    {
163
        foreach ($this->seeds as $key => $value) {
164
            if (file_exists(database_path('seeds/'.$value)) && ! $this->option('force')) {
165
                if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) {
166
                    continue;
167
                }
168
            }
169
170
            copy(
171
                base_path('stubs/seeds/'.$key),
172
                database_path('seeds/'.$value)
173
            );
174
        }
175
    }
176
177
    /**
178
     * @param $src