Test Setup Failed
Push — master ( 8dfbd7...f4d50e )
by Raí
12:19 queued 06:17
created
Bludata/Framework/Laravel/Application/BaseApplication.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,62 +8,62 @@
 block discarded – undo
8 8
 
9 9
 class BaseApplication extends Application
10 10
 {
11
-    public function publicRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
11
+    public function publicRoutes (string $uri, string $controller, Closure $routes = null, array $options = [ ])
12 12
     {
13
-        $options['only'] = $options['only'] ?? ['index', 'show', 'destroyed'];
13
+        $options[ 'only' ] = $options[ 'only' ] ?? [ 'index', 'show', 'destroyed' ];
14 14
 
15 15
         return $this->resourceRoutes($uri, $controller, $routes, $options);
16 16
     }
17 17
 
18
-    public function routesWithPermission(string $uri, string $controller, Closure $routes = null, array $options = [])
18
+    public function routesWithPermission (string $uri, string $controller, Closure $routes = null, array $options = [ ])
19 19
     {
20
-        $options['only'] = $options['only'] ?? ['store', 'update', 'destroyed', 'restoreDestroyed'];
20
+        $options[ 'only' ] = $options[ 'only' ] ?? [ 'store', 'update', 'destroyed', 'restoreDestroyed' ];
21 21
 
22 22
         return $this->resourceRoutes($uri, $controller, $routes, $options);
23 23
     }
24 24
 
25
-    public function resourceRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
25
+    public function resourceRoutes (string $uri, string $controller, Closure $routes = null, array $options = [ ])
26 26
     {
27
-        $options['name'] = $options['name'] ?? $uri;
28
-        $options['only'] = $options['only'] ?? [];
29
-        $options['except'] = $options['except'] ?? [];
27
+        $options[ 'name' ] = $options[ 'name' ] ?? $uri;
28
+        $options[ 'only' ] = $options[ 'only' ] ?? [ ];
29
+        $options[ 'except' ] = $options[ 'except' ] ?? [ ];
30 30
 
31
-        $exceptAll = isset($options['except'][0]) && $options['except'][0] == '*';
31
+        $exceptAll = isset($options[ 'except' ][ 0 ]) && $options[ 'except' ][ 0 ] == '*';
32 32
 
33 33
         if (!$exceptAll) {
34
-            if (in_array('index', $options['only']) && !in_array('index', $options['except'])) {
34
+            if (in_array('index', $options[ 'only' ]) && !in_array('index', $options[ 'except' ])) {
35 35
                 Route::get($uri, $controller.'@index')
36
-                        ->name($options['name'].'.index');
36
+                        ->name($options[ 'name' ].'.index');
37 37
             }
38 38
 
39
-            if (in_array('show', $options['only']) && !in_array('show', $options['except'])) {
39
+            if (in_array('show', $options[ 'only' ]) && !in_array('show', $options[ 'except' ])) {
40 40
                 Route::get($uri.'/{uuid}', $controller.'@show')
41
-                        ->name($options['name'].'.show');
41
+                        ->name($options[ 'name' ].'.show');
42 42
             }
43 43
 
44
-            if (in_array('store', $options['only']) && !in_array('store', $options['except'])) {
44
+            if (in_array('store', $options[ 'only' ]) && !in_array('store', $options[ 'except' ])) {
45 45
                 Route::post($uri, $controller.'@store')
46
-                        ->name($options['name'].'.store');
46
+                        ->name($options[ 'name' ].'.store');
47 47
             }
48 48
 
49
-            if (in_array('update', $options['only']) && !in_array('update', $options['except'])) {
49
+            if (in_array('update', $options[ 'only' ]) && !in_array('update', $options[ 'except' ])) {
50 50
                 Route::put($uri.'/{uuid}', $controller.'@update')
51
-                        ->name($options['name'].'.update');
51
+                        ->name($options[ 'name' ].'.update');
52 52
             }
53 53
 
54
-            if (in_array('destroy', $options['only']) && !in_array('destroy', $options['except'])) {
54
+            if (in_array('destroy', $options[ 'only' ]) && !in_array('destroy', $options[ 'except' ])) {
55 55
                 Route::delete($uri.'/{uuid}', $controller.'@destroy')
56
-                        ->name($options['name'].'.destroy');
56
+                        ->name($options[ 'name' ].'.destroy');
57 57
             }
58 58
 
59
-            if (in_array('destroyed', $options['only']) && !in_array('destroyed', $options['except'])) {
59
+            if (in_array('destroyed', $options[ 'only' ]) && !in_array('destroyed', $options[ 'except' ])) {
60 60
                 Route::get($uri.'/destroyed', $controller.'@destroyed')
61
-                        ->name($options['name'].'.destroyed');
61
+                        ->name($options[ 'name' ].'.destroyed');
62 62
             }
63 63
 
64
-            if (in_array('restoreDestroyed', $options['only']) && !in_array('restoreDestroyed', $options['except'])) {
64
+            if (in_array('restoreDestroyed', $options[ 'only' ]) && !in_array('restoreDestroyed', $options[ 'except' ])) {
65 65
                 Route::post($uri.'/{uuid}', $controller.'@restoreDestroyed')
66
-                        ->name($options['name'].'.restoreDestroyed');
66
+                        ->name($options[ 'name' ].'.restoreDestroyed');
67 67
             }
68 68
         }
69 69
 
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @return void
23 23
      */
24
-    public function boot()
24
+    public function boot ()
25 25
     {
26 26
         //
27 27
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @return void
35 35
      */
36
-    public function map()
36
+    public function map ()
37 37
     {
38 38
         $this->mapApiRoutes();
39 39
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return void
51 51
      */
52
-    protected function mapWebRoutes()
52
+    protected function mapWebRoutes ()
53 53
     {
54 54
         Route::middleware('web')
55 55
                 ->namespace($this->namespace)
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return void
65 65
      */
66
-    protected function mapApiRoutes()
66
+    protected function mapApiRoutes ()
67 67
     {
68 68
         Route::prefix('api')
69 69
                 ->middleware('api')
Please login to merge, or discard this patch.