@@ -122,19 +122,19 @@ discard block |
||
122 | 122 | protected function setupTest() |
123 | 123 | { |
124 | 124 | foreach ($this->migrations as $key => $value) { |
125 | - $this->migrations[$key] = $value . $this->testPostfix; |
|
125 | + $this->migrations[ $key ] = $value . $this->testPostfix; |
|
126 | 126 | } |
127 | 127 | foreach ($this->seeds as $key => $value) { |
128 | - $this->seeds[$key] = $value . $this->testPostfix; |
|
128 | + $this->seeds[ $key ] = $value . $this->testPostfix; |
|
129 | 129 | } |
130 | 130 | foreach ($this->controllers as $key => $value) { |
131 | - $this->controllers[$key] = $value . $this->testPostfix; |
|
131 | + $this->controllers[ $key ] = $value . $this->testPostfix; |
|
132 | 132 | } |
133 | 133 | foreach ($this->models as $key => $value) { |
134 | - $this->models[$key] = $value . $this->testPostfix; |
|
134 | + $this->models[ $key ] = $value . $this->testPostfix; |
|
135 | 135 | } |
136 | 136 | foreach ($this->jsonapiEntities as $key => $value) { |
137 | - $this->jsonapiEntities[$key] = $value . $this->testPostfix; |
|
137 | + $this->jsonapiEntities[ $key ] = $value . $this->testPostfix; |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | foreach ($this->migrations as $key => $value) { |
171 | 171 | $mask = database_path('migrations/*' . $value); |
172 | - array_map( "unlink", glob( $mask ) ); |
|
172 | + array_map("unlink", glob($mask)); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | if (file_exists(app_path('JsonApi'))) { |
216 | - if(!@rmdir(app_path('JsonApi'))) { |
|
216 | + if (!@rmdir(app_path('JsonApi'))) { |
|
217 | 217 | throw new \League\Flysystem\Exception('JsonApi directory is not empty!'); |
218 | 218 | }; |
219 | 219 | } |
@@ -126,19 +126,19 @@ discard block |
||
126 | 126 | protected function setupTest() |
127 | 127 | { |
128 | 128 | foreach ($this->migrations as $key => $value) { |
129 | - $this->migrations[$key] = $value . $this->testPostfix; |
|
129 | + $this->migrations[ $key ] = $value . $this->testPostfix; |
|
130 | 130 | } |
131 | 131 | foreach ($this->seeds as $key => $value) { |
132 | - $this->seeds[$key] = $value . $this->testPostfix; |
|
132 | + $this->seeds[ $key ] = $value . $this->testPostfix; |
|
133 | 133 | } |
134 | 134 | foreach ($this->controllers as $key => $value) { |
135 | - $this->controllers[$key] = $value . $this->testPostfix; |
|
135 | + $this->controllers[ $key ] = $value . $this->testPostfix; |
|
136 | 136 | } |
137 | 137 | foreach ($this->models as $key => $value) { |
138 | - $this->models[$key] = $value . $this->testPostfix; |
|
138 | + $this->models[ $key ] = $value . $this->testPostfix; |
|
139 | 139 | } |
140 | 140 | foreach ($this->jsonapiEntities as $key => $value) { |
141 | - $this->jsonapiEntities[$key] = $value . $this->testPostfix; |
|
141 | + $this->jsonapiEntities[ $key ] = $value . $this->testPostfix; |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | protected function copyJsonApiEntities() |
178 | 178 | { |
179 | 179 | foreach ($this->jsonapiEntities as $key => $value) { |
180 | - if (file_exists(app_path('JsonApi/'.$value)) && ! $this->option('force')) { |
|
181 | - if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
180 | + if (file_exists(app_path('JsonApi/' . $value)) && !$this->option('force')) { |
|
181 | + if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
182 | 182 | continue; |
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | 186 | copy( |
187 | - base_path('stubs/'.$key), |
|
187 | + base_path('stubs/' . $key), |
|
188 | 188 | app_path($value) |
189 | 189 | ); |
190 | 190 | } |
@@ -196,15 +196,15 @@ discard block |
||
196 | 196 | protected function exportControllers() |
197 | 197 | { |
198 | 198 | foreach ($this->controllers as $key => $value) { |
199 | - if (file_exists(app_path('Http/Controllers/Api/v1/'.$value)) && ! $this->option('force')) { |
|
200 | - if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
199 | + if (file_exists(app_path('Http/Controllers/Api/v1/' . $value)) && !$this->option('force')) { |
|
200 | + if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
201 | 201 | continue; |
202 | 202 | } |
203 | 203 | } |
204 | 204 | |
205 | 205 | copy( |
206 | - base_path('stubs/Controllers/'.$key), |
|
207 | - app_path('Http/Controllers/Api/v1/'.$value) |
|
206 | + base_path('stubs/Controllers/' . $key), |
|
207 | + app_path('Http/Controllers/Api/v1/' . $value) |
|
208 | 208 | ); |
209 | 209 | } |
210 | 210 | } |
@@ -215,15 +215,15 @@ discard block |
||
215 | 215 | protected function exportModels() |
216 | 216 | { |
217 | 217 | foreach ($this->models as $key => $value) { |
218 | - if (file_exists(app_path('Models/'.$value)) && ! $this->option('force')) { |
|
219 | - if (! $this->confirm("The [{$value}] model already exists. Do you want to replace it?")) { |
|
218 | + if (file_exists(app_path('Models/' . $value)) && !$this->option('force')) { |
|
219 | + if (!$this->confirm("The [{$value}] model already exists. Do you want to replace it?")) { |
|
220 | 220 | continue; |
221 | 221 | } |
222 | 222 | } |
223 | 223 | |
224 | 224 | copy( |
225 | - base_path('stubs/Models/'.$key), |
|
226 | - app_path('Models/'.$value) |
|
225 | + base_path('stubs/Models/' . $key), |
|
226 | + app_path('Models/' . $value) |
|
227 | 227 | ); |
228 | 228 | } |
229 | 229 | } |
@@ -235,15 +235,15 @@ discard block |
||
235 | 235 | { |
236 | 236 | $counter = 0; |
237 | 237 | foreach ($this->migrations as $key => $value) { |
238 | - if (file_exists(database_path('migrations/'.$value)) && ! $this->option('force')) { |
|
239 | - if (! $this->confirm("The [{$value}] migration already exists. Do you want to replace it?")) { |
|
238 | + if (file_exists(database_path('migrations/' . $value)) && !$this->option('force')) { |
|
239 | + if (!$this->confirm("The [{$value}] migration already exists. Do you want to replace it?")) { |
|
240 | 240 | continue; |
241 | 241 | } |
242 | 242 | } |
243 | 243 | |
244 | 244 | copy( |
245 | 245 | base_path('stubs/migrations/' . $key), |
246 | - database_path('migrations/'. date('Y_m_d_Hi') . '0' . $counter++ . '_' . $value) |
|
246 | + database_path('migrations/' . date('Y_m_d_Hi') . '0' . $counter++ . '_' . $value) |
|
247 | 247 | ); |
248 | 248 | } |
249 | 249 | } |
@@ -254,15 +254,15 @@ discard block |
||
254 | 254 | protected function exportSeeds() |
255 | 255 | { |
256 | 256 | foreach ($this->seeds as $key => $value) { |
257 | - if (file_exists(database_path('seeds/'.$value)) && ! $this->option('force')) { |
|
258 | - if (! $this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
257 | + if (file_exists(database_path('seeds/' . $value)) && !$this->option('force')) { |
|
258 | + if (!$this->confirm("The [{$value}] already exists. Do you want to replace it?")) { |
|
259 | 259 | continue; |
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
263 | 263 | copy( |
264 | - base_path('stubs/seeds/'.$key), |
|
265 | - database_path('seeds/'.$value) |
|
264 | + base_path('stubs/seeds/' . $key), |
|
265 | + database_path('seeds/' . $value) |
|
266 | 266 | ); |
267 | 267 | } |
268 | 268 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | * @param $src |
272 | 272 | * @param $dst |
273 | 273 | */ |
274 | - protected function recurse_copy($src,$dst) |
|
274 | + protected function recurse_copy($src, $dst) |
|
275 | 275 | { |
276 | 276 | $dir = opendir($src); |
277 | 277 | @mkdir($dst); |