Completed
Push — master ( 030bab...270884 )
by Sergi Tur
02:49
created
routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::get('/user', function (Request $request) {
16
+Route::get('/user', function(Request $request) {
17 17
     return $request->user();
18 18
 })->middleware('auth:api');
19 19
 
20
-Route::group(['prefix' => 'v1','middleware' => 'auth:api'], function () {
20
+Route::group([ 'prefix' => 'v1', 'middleware' => 'auth:api' ], function() {
21 21
 //    Route::resource('task', 'TasksController');
22 22
 
23 23
     //Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly.
Please login to merge, or discard this patch.
src/Console/Routes/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         if (str_contains($controllername, '@')) {
25 25
             return ucfirst($controllername);
26 26
         }
27
-        return ucfirst($controllername . '@index');
27
+        return ucfirst($controllername.'@index');
28 28
     }
29 29
 
30 30
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     protected function controllerMethod($controllername)
51 51
     {
52 52
         if (str_contains($controller = $controllername, '@')) {
53
-            return substr($controllername, strpos($controllername, '@')+1, strlen($controllername));
53
+            return substr($controllername, strpos($controllername, '@') + 1, strlen($controllername));
54 54
         }
55 55
         return 'index';
56 56
     }
Please login to merge, or discard this patch.
src/Console/MakeMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
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/MakeVC.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
 
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
      * @return string
48 48
      */
49 49
     protected function command() {
50
-        $api = $this->option('api') ? ' --api '  : '';
51
-        $action = $this->argument('action') ? ' ' . $this->argument('action') . ' ' : '';
52
-        return 'php artisan make:route ' . $this->argument('link') . $action . ' --type=' . $this->option('type') .
53
-            ' --method=' . $this->option('method') .
54
-            $api .
50
+        $api = $this->option('api') ? ' --api ' : '';
51
+        $action = $this->argument('action') ? ' '.$this->argument('action').' ' : '';
52
+        return 'php artisan make:route '.$this->argument('link').$action.' --type='.$this->option('type').
53
+            ' --method='.$this->option('method').
54
+            $api.
55 55
             ' -a --menu';
56 56
     }
57 57
 }
Please login to merge, or discard this patch.