@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | if ($this->app->runningInConsole()) { |
29 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class]); |
|
30 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class]); |
|
31 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class]); |
|
32 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class]); |
|
33 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class]); |
|
34 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class]); |
|
35 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class]); |
|
36 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeView::class]); |
|
37 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class]); |
|
38 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class]); |
|
39 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeRoute::class]); |
|
40 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMenu::class]); |
|
29 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class ]); |
|
30 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class ]); |
|
31 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class ]); |
|
32 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class ]); |
|
33 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class ]); |
|
34 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class ]); |
|
35 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class ]); |
|
36 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeView::class ]); |
|
37 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class ]); |
|
38 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class ]); |
|
39 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeRoute::class ]); |
|
40 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeMenu::class ]); |
|
41 | 41 | } |
42 | 42 | |
43 | - $this->app->bind('AdminLTE', function () { |
|
43 | + $this->app->bind('AdminLTE', function() { |
|
44 | 44 | return new \Acacha\AdminLTETemplateLaravel\AdminLTE(); |
45 | 45 | }); |
46 | 46 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if (!$this->app->routesAreCached()) { |
104 | 104 | $router = app('router'); |
105 | 105 | |
106 | - $router->group(['namespace' => $this->getAppNamespace().'Http\Controllers'], function () { |
|
106 | + $router->group([ 'namespace' => $this->getAppNamespace().'Http\Controllers' ], function() { |
|
107 | 107 | require __DIR__.'/../Http/routes.php'; |
108 | 108 | }); |
109 | 109 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | class MakeRoute extends Command |
24 | 24 | { |
25 | - use Controller; |
|
25 | + use Controller; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Path to web routes file. |
@@ -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 ' . $link . ' added to ' . $dstFile . '.'); |
|
102 | + $this->info('Route '.$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); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | if ($this->argument('action') != null) { |
281 | 281 | return $this->argument('action'); |
282 | 282 | } |
283 | - if (strtolower($this->option('type')) != 'regular' ) return $this->argument('link') . 'Controller'; |
|
283 | + if (strtolower($this->option('type')) != 'regular') return $this->argument('link').'Controller'; |
|
284 | 284 | return $this->argument('link'); |
285 | 285 | } |
286 | 286 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | protected function validateMethod() |
300 | 300 | { |
301 | - if (! in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, ['ANY']))) { |
|
301 | + if (!in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, [ 'ANY' ]))) { |
|
302 | 302 | throw new MethodNotAllowedException($methods); |
303 | 303 | } |
304 | 304 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | protected function validateType() |
310 | 310 | { |
311 | - if (! in_array(strtolower($this->option('type')), ['regular','controller','resource'])) { |
|
311 | + if (!in_array(strtolower($this->option('type')), [ 'regular', 'controller', 'resource' ])) { |
|
312 | 312 | throw new RouteTypeNotValid(); |
313 | 313 | } |
314 | 314 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | 'link' => $link = $this->argument('link'), |
343 | 343 | 'name' => ucfirst($link), |
344 | 344 | ]); |
345 | - $this->info('Menu entry ' . $link .' added to config/menu.php file.'); |
|
345 | + $this->info('Menu entry '.$link.' added to config/menu.php file.'); |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | protected function warnIfSpatieMenuIsNotInstalled() |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | Artisan::call('make:view', [ |
378 | 378 | 'name' => $name |
379 | 379 | ]); |
380 | - $this->info('View ' . $name .'.blade.php created.'); |
|
380 | + $this->info('View '.$name.'.blade.php created.'); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | 'name' => $controller = $this->controllerWithoutMethod($this->action()) |
390 | 390 | ]); |
391 | 391 | $this->addMethodToController($controller, $this->controllerMethod($this->action())); |
392 | - $this->info('Controller ' . $controller .' created.'); |
|
392 | + $this->info('Controller '.$controller.' created.'); |
|
393 | 393 | $this->createView($this->argument('link')); |
394 | 394 | } |
395 | 395 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | 'name' => $controller = $this->controllerWithoutMethod($this->action()), |
403 | 403 | '--resource' => true |
404 | 404 | ]); |
405 | - $this->info('Resource Controller ' . $controller .' created.'); |
|
405 | + $this->info('Resource Controller '.$controller.' created.'); |
|
406 | 406 | $this->createView($this->argument('link')); |
407 | 407 | } |
408 | 408 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | { |
417 | 417 | $tmpfile = $this->createTmpFileWithMethod($controllerMethod); |
418 | 418 | $path = $this->getPath($tmpfile); |
419 | - add_file_into_file('\/\/', $path, app_path('Http/Controllers/' . $controller . '.php')); |
|
419 | + add_file_into_file('\/\/', $path, app_path('Http/Controllers/'.$controller.'.php')); |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | /** |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | */ |
457 | 457 | protected function getMethodStubPath() |
458 | 458 | { |
459 | - return __DIR__ . '/stubs/method.stub'; |
|
459 | + return __DIR__.'/stubs/method.stub'; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $tmpfile = $this->createTmpFileWithMenu(); |
79 | 79 | $path = $this->getPath($tmpfile); |
80 | 80 | add_file_into_file($this->mountpoint(), $path, $dstFile = $this->destinationFile()); |
81 | - $this->info('Menu ' . $this->name() . ' added to ' . $dstFile . '.'); |
|
81 | + $this->info('Menu '.$this->name().' added to '.$dstFile.'.'); |
|
82 | 82 | $this->postActions(); |
83 | 83 | } |
84 | 84 | |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | protected function getMenuCode() |
123 | 123 | { |
124 | 124 | $type = $this->option('type'); |
125 | - $class = isset(static::$lookup[$type]) |
|
126 | - ? static::$lookup[$type] |
|
125 | + $class = isset(static::$lookup[ $type ]) |
|
126 | + ? static::$lookup[ $type ] |
|
127 | 127 | : RegularMenu::class; |
128 | 128 | /** @var GeneratesCode $route */ |
129 | 129 | $route = new $class($this->compiler, $this->filesystem); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function getPath($tmpfile) |
144 | 144 | { |
145 | - return stream_get_meta_data($tmpfile)['uri']; |
|
145 | + return stream_get_meta_data($tmpfile)[ 'uri' ]; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | protected function getStubPath() |
33 | 33 | { |
34 | - return __DIR__ . '/../stubs/menu.stub'; |
|
34 | + return __DIR__.'/../stubs/menu.stub'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | protected function obtainReplacements() |
41 | 41 | { |
42 | 42 | return [ |
43 | - 'MENU_LINK' => $this->getReplacements()[0], |
|
44 | - 'MENU_NAME' => $this->getReplacements()[1] |
|
43 | + 'MENU_LINK' => $this->getReplacements()[ 0 ], |
|
44 | + 'MENU_NAME' => $this->getReplacements()[ 1 ] |
|
45 | 45 | ]; |
46 | 46 | } |
47 | 47 | } |