@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $tmpfile = $this->createTmpFileWithRoute(); |
100 | 100 | $path = $this->getPath($tmpfile); |
101 | 101 | add_file_into_file($this->mountpoint(), $path, $dstFile = $this->destinationFile()); |
102 | - $this->info('Route ' . undot_path($link) . ' added to ' . $dstFile . '.'); |
|
102 | + $this->info('Route '.undot_path($link).' added to '.$dstFile.'.'); |
|
103 | 103 | $this->postActions(); |
104 | 104 | } |
105 | 105 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $link = $this->removeTrailingSlashIfExists($link); |
170 | 170 | $link = $this->removeDuplicatedTrailingSlashes($link); |
171 | 171 | foreach (Route::getRoutes() as $value) { |
172 | - if (in_array(strtoupper($this->option('method')), array_merge($value->getMethods(), ['ANY'])) && |
|
172 | + if (in_array(strtoupper($this->option('method')), array_merge($value->getMethods(), [ 'ANY' ])) && |
|
173 | 173 | $value->getPath() === $link) { |
174 | 174 | return true; |
175 | 175 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | protected function apiRouteExists($link) |
212 | 212 | { |
213 | - return $this->webRouteExists('api/v1/' . $link); |
|
213 | + return $this->webRouteExists('api/v1/'.$link); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | protected function getPath($tmpfile) |
235 | 235 | { |
236 | - return stream_get_meta_data($tmpfile)['uri']; |
|
236 | + return stream_get_meta_data($tmpfile)[ 'uri' ]; |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | protected function getRouteCode() |
245 | 245 | { |
246 | 246 | $type = $this->option('type'); |
247 | - $class = isset(static::$lookup[$type]) |
|
248 | - ? static::$lookup[$type] |
|
247 | + $class = isset(static::$lookup[ $type ]) |
|
248 | + ? static::$lookup[ $type ] |
|
249 | 249 | : RegularRoute::class; |
250 | 250 | /** @var GeneratesCode $route */ |
251 | 251 | $route = new $class($this->compiler, $this->filesystem); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | return $this->argument('action'); |
282 | 282 | } |
283 | 283 | if (strtolower($this->option('type')) != 'regular') { |
284 | - return $this->argument('link') . 'Controller'; |
|
284 | + return $this->argument('link').'Controller'; |
|
285 | 285 | } |
286 | 286 | return $this->argument('link'); |
287 | 287 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | protected function validateMethod() |
302 | 302 | { |
303 | - if (! in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, ['ANY']))) { |
|
303 | + if (!in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, [ 'ANY' ]))) { |
|
304 | 304 | throw new MethodNotAllowedException($methods); |
305 | 305 | } |
306 | 306 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function validateType() |
312 | 312 | { |
313 | - if (! in_array(strtolower($this->option('type')), ['regular','controller','resource'])) { |
|
313 | + if (!in_array(strtolower($this->option('type')), [ 'regular', 'controller', 'resource' ])) { |
|
314 | 314 | throw new RouteTypeNotValid(); |
315 | 315 | } |
316 | 316 | } |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | 'link' => $link = undot_path($this->argument('link')), |
345 | 345 | 'name' => ucfirst($link), |
346 | 346 | ]); |
347 | - $this->info('Menu entry ' . $link .' added to config/menu.php file.'); |
|
347 | + $this->info('Menu entry '.$link.' added to config/menu.php file.'); |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | protected function warnIfSpatieMenuIsNotInstalled() |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | Artisan::call('make:view', [ |
382 | 382 | 'name' => $name |
383 | 383 | ]); |
384 | - $this->info('View ' . undot_path($name) .'.blade.php created.'); |
|
384 | + $this->info('View '.undot_path($name).'.blade.php created.'); |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | /** |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | 'name' => $controller = $this->controllerWithoutMethod($this->action()) |
394 | 394 | ]); |
395 | 395 | $this->addMethodToController($controller, $this->controllerMethod($this->action())); |
396 | - $this->info('Controller ' . $controller .' created.'); |
|
396 | + $this->info('Controller '.$controller.' created.'); |
|
397 | 397 | $this->createView($this->argument('link')); |
398 | 398 | } |
399 | 399 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | 'name' => $controller = $this->controllerWithoutMethod($this->action()), |
407 | 407 | '--resource' => true |
408 | 408 | ]); |
409 | - $this->info('Resource Controller ' . $controller .' created.'); |
|
409 | + $this->info('Resource Controller '.$controller.' created.'); |
|
410 | 410 | $this->createView($this->argument('link')); |
411 | 411 | } |
412 | 412 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | { |
421 | 421 | $tmpfile = $this->createTmpFileWithMethod($controllerMethod); |
422 | 422 | $path = $this->getPath($tmpfile); |
423 | - add_file_into_file('\/\/', $path, app_path('Http/Controllers/' . $controller . '.php')); |
|
423 | + add_file_into_file('\/\/', $path, app_path('Http/Controllers/'.$controller.'.php')); |
|
424 | 424 | } |
425 | 425 | |
426 | 426 | /** |
@@ -460,6 +460,6 @@ discard block |
||
460 | 460 | */ |
461 | 461 | protected function getMethodStubPath() |
462 | 462 | { |
463 | - return __DIR__ . '/stubs/method.stub'; |
|
463 | + return __DIR__.'/stubs/method.stub'; |
|
464 | 464 | } |
465 | 465 | } |