Completed
Push — master ( a65bcd...f7d1d5 )
by Sergi Tur
06:22 queued 03:27
created
src/Console/Menus/RegularMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Console/MakeView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
     {
54 54
         try {
55 55
             $this->filesystem->make(
56
-                $path = resource_path('views/' . $this->viewPath()),
56
+                $path = resource_path('views/'.$this->viewPath()),
57 57
                 $this->filesystem->get($this->getStubPath()),
58 58
                 true
59 59
             );
60
-            $this->info('File ' . $path . ' created');
60
+            $this->info('File '.$path.' created');
61 61
         } catch (\Exception $e) {
62 62
             $this->error($e->getMessage());
63 63
         }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function getStubPath()
70 70
     {
71
-        return __DIR__ . '/stubs/view.stub';
71
+        return __DIR__.'/stubs/view.stub';
72 72
     }
73 73
 
74 74
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected function constructViewBladeName($name)
91 91
     {
92
-        return $this->dottedPathToSlashesPath($name) . '.blade.php';
92
+        return $this->dottedPathToSlashesPath($name).'.blade.php';
93 93
     }
94 94
 
95 95
     /**
Please login to merge, or discard this patch.
src/Console/Routes/ControllerRoute.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     protected function getStubPath()
34 34
     {
35
-        return __DIR__ . '/../stubs/route_with_controller.stub';
35
+        return __DIR__.'/../stubs/route_with_controller.stub';
36 36
     }
37 37
 
38 38
     /**
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
     protected function obtainReplacements()
44 44
     {
45 45
         return [
46
-            'ROUTE_LINK' => $link = $this->getReplacements()[0],
47
-            'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[1]),
48
-            'ROUTE_METHOD' => $this->getReplacements()[2],
46
+            'ROUTE_LINK' => $link = $this->getReplacements()[ 0 ],
47
+            'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[ 1 ]),
48
+            'ROUTE_METHOD' => $this->getReplacements()[ 2 ],
49 49
             'ROUTE_NAME' => dot_path($link),
50 50
         ];
51 51
     }
Please login to merge, or discard this patch.
src/Console/Routes/RegularRoute.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function getStubPath()
33 33
     {
34
-        return __DIR__ . '/../stubs/route.stub';
34
+        return __DIR__.'/../stubs/route.stub';
35 35
     }
36 36
 
37 37
     /**
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
     protected function obtainReplacements()
41 41
     {
42 42
         return [
43
-            'ROUTE_LINK' => $link = $this->getReplacements()[0],
44
-            'ROUTE_VIEW' => $this->getReplacements()[1],
45
-            'ROUTE_METHOD' => $this->getReplacements()[2],
43
+            'ROUTE_LINK' => $link = $this->getReplacements()[ 0 ],
44
+            'ROUTE_VIEW' => $this->getReplacements()[ 1 ],
45
+            'ROUTE_METHOD' => $this->getReplacements()[ 2 ],
46 46
             'ROUTE_NAME' => dot_path($link),
47 47
         ];
48 48
     }
Please login to merge, or discard this patch.
src/Filesystem/Filesystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $path = $this->getPath($file);
65 65
 
66
-        if (! file_exists($path)) {
66
+        if (!file_exists($path)) {
67 67
             throw new FileDoesNotExists;
68 68
         }
69 69
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function createParentFolder($file)
97 97
     {
98
-        if (! file_exists($folder = dirname($file))) {
98
+        if (!file_exists($folder = dirname($file))) {
99 99
             return mkdir(dirname($file), 0775, true);
100 100
         }
101 101
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected function getPath($file)
121 121
     {
122
-        return $this->root . '/' . $file;
122
+        return $this->root.'/'.$file;
123 123
     }
124 124
 
125 125
     /**
Please login to merge, or discard this patch.
src/Console/CreatesModels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
      */
15 15
     public function createModel($name)
16 16
     {
17
-        passthru('php artisan make:model -m ' . snake_case($name));
17
+        passthru('php artisan make:model -m '.snake_case($name));
18 18
     }
19 19
 }
Please login to merge, or discard this patch.
src/Console/MakeRoute.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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->methods(), ['ANY'])) &&
172
+            if (in_array(strtoupper($this->option('method')), array_merge($value->methods(), [ 'ANY' ])) &&
173 173
                 $value->uri() === $link) {
174 174
                 return true;
175 175
             }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
             'link' => $link = undot_path($this->argument('link')),
348 348
             'name' => ucfirst($link),
349 349
         ]);
350
-        $this->info('Menu entry ' . $link .' added to config/menu.php file.');
350
+        $this->info('Menu entry '.$link.' added to config/menu.php file.');
351 351
     }
352 352
 
353 353
     /**
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         Artisan::call('make:view', [
390 390
             'name' => $name
391 391
         ]);
392
-        $this->info('View ' . undot_path($name) .'.blade.php created.');
392
+        $this->info('View '.undot_path($name).'.blade.php created.');
393 393
     }
394 394
 
395 395
     /**
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
             'name' => $controller = $this->controllerWithoutMethod($this->action())
402 402
         ]);
403 403
         $this->addMethodToController($controller, $this->controllerMethod($this->action()));
404
-        $this->info('Controller ' . $controller .' created.');
404
+        $this->info('Controller '.$controller.' created.');
405 405
         $this->createView($this->argument('link'));
406 406
     }
407 407
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
             'name' => $controller = $this->controllerWithoutMethod($this->action()),
415 415
             '--resource' => true
416 416
         ]);
417
-        $this->info('Resource Controller ' . $controller .' created.');
417
+        $this->info('Resource Controller '.$controller.' created.');
418 418
         $this->createView($this->argument('link'));
419 419
     }
420 420
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
     {
429 429
         $tmpfile = $this->createTmpFileWithMethod($controllerMethod);
430 430
         $path = $this->getPath($tmpfile);
431
-        add_file_into_file('\/\/', $path, app_path('Http/Controllers/' . $controller . '.php'));
431
+        add_file_into_file('\/\/', $path, app_path('Http/Controllers/'.$controller.'.php'));
432 432
     }
433 433
 
434 434
     /**
@@ -468,6 +468,6 @@  discard block
 block discarded – undo
468 468
      */
469 469
     protected function getMethodStubPath()
470 470
     {
471
-        return __DIR__ . '/stubs/method.stub';
471
+        return __DIR__.'/stubs/method.stub';
472 472
     }
473 473
 }
Please login to merge, or discard this patch.
src/Providers/AdminLTETemplateServiceProvider.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@  discard block
 block discarded – undo
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]);
41
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeV::class]);
42
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeVC::class]);
43
-            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMVC::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
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeV::class ]);
42
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeVC::class ]);
43
+            $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeMVC::class ]);
44 44
         }
45 45
 
46
-        $this->app->bind('AdminLTE', function () {
46
+        $this->app->bind('AdminLTE', function() {
47 47
             return new \Acacha\AdminLTETemplateLaravel\AdminLTE();
48 48
         });
49 49
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         if (!$this->app->routesAreCached()) {
107 107
             $router = app('router');
108 108
 
109
-            $router->group(['namespace' => $this->getAppNamespace().'Http\Controllers'], function () {
109
+            $router->group([ 'namespace' => $this->getAppNamespace().'Http\Controllers' ], function() {
110 110
                 require __DIR__.'/../Http/routes.php';
111 111
             });
112 112
         }
Please login to merge, or discard this patch.
src/Console/MakeV.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function handle()
39 39
     {
40
-        $this->info('Running command ' . $command = $this->command());
40
+        $this->info('Running command '.$command = $this->command());
41 41
         passthru($command);
42 42
     }
43 43
 
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
      */
49 49
     protected function command()
50 50
     {
51
-        $api = $this->option('api') ? ' --api '  : '';
52
-        $action = $this->argument('action') ? ' ' . $this->argument('action') . ' ' : '';
53
-        return 'php artisan make:route ' . $this->argument('link') . $action . ' --type=' . $this->option('type') .
54
-            ' --method=' . $this->option('method') .
55
-            $api .
51
+        $api = $this->option('api') ? ' --api ' : '';
52
+        $action = $this->argument('action') ? ' '.$this->argument('action').' ' : '';
53
+        return 'php artisan make:route '.$this->argument('link').$action.' --type='.$this->option('type').
54
+            ' --method='.$this->option('method').
55
+            $api.
56 56
             ' -a --menu';
57 57
     }
58 58
 }
Please login to merge, or discard this patch.