Completed
Push — master ( 458ec2...40ca11 )
by AHMED JOHARI
03:50
created
src/Routings/Builder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
             'middleware' => ['web']
51 51
         ];
52 52
 
53
-        $components->each(function ($component, $controller) use ($options) {
54
-            collect($component)->each(function ($attributes, $function) use ($controller, $options) {
53
+        $components->each(function($component, $controller) use ($options) {
54
+            collect($component)->each(function($attributes, $function) use ($controller, $options) {
55 55
                 $options = Arr::set($options, 'prefix', $controller);
56 56
 
57 57
                 if (Arr::get($attributes, 'auth', false)) {
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
                     $options = Arr::set($options, 'middleware', array_merge(Arr::wrap($middleware), ['auth']));
61 61
                 }
62 62
 
63
-                $this->router->group($options, function (Router $router) use ($controller, $function, $attributes) {
64
-                    collect($this->componentMethods)->each(function ($type) use ($router, $controller, $function, $attributes) {
63
+                $this->router->group($options, function(Router $router) use ($controller, $function, $attributes) {
64
+                    collect($this->componentMethods)->each(function($type) use ($router, $controller, $function, $attributes) {
65 65
                         $router->addRoute(
66 66
                             Str::upper($type),
67 67
                             $this->pathConvention($type, $function, $attributes),
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
             'middleware' => ['auth:api']
91 91
         ];
92 92
 
93
-        $this->router->group($options, function (Router $router) use ($apis) {
94
-            $apis->each(function ($routes, $method) use ($router) {
93
+        $this->router->group($options, function(Router $router) use ($apis) {
94
+            $apis->each(function($routes, $method) use ($router) {
95 95
                 if (!empty($routes)) {
96 96
                     list($path, $controller, $named) = Arr::first($routes);
97 97
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                         $path,
101 101
                         Str::ucfirst($controller)
102 102
                     )->name(
103
-                        'api.' . $named
103
+                        'api.'.$named
104 104
                     );
105 105
                 }
106 106
             });
Please login to merge, or discard this patch.
src/Routings/Concerns/Grammar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
         if (!\is_array($keymap) || empty($keymap)) {
25 25
             return $function;
26 26
         } else {
27
-            $keymap = collect($keymap)->map(function ($id) {
28
-                return '{' . $id . '}';
27
+            $keymap = collect($keymap)->map(function($id) {
28
+                return '{'.$id.'}';
29 29
             })->implode('/');
30 30
 
31
-            return $function . '/' . $keymap;
31
+            return $function.'/'.$keymap;
32 32
         }
33 33
     }
34 34
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     protected function classConvention(string $type, string $controller, string $function): string
80 80
     {
81
-        return Str::ucfirst($controller) . 'Controller@' . Str::camel(Str::lower($type) . '_' . $function);
81
+        return Str::ucfirst($controller).'Controller@'.Str::camel(Str::lower($type).'_'.$function);
82 82
     }
83 83
 
84 84
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $named = Arr::get($attributes, 'named', null);
97 97
 
98 98
         if ($named === '' || $named === null) {
99
-            $named = Str::lower($controller . '.' . $type . '.' . $function);
99
+            $named = Str::lower($controller.'.'.$type.'.'.$function);
100 100
         }
101 101
 
102 102
         return Str::lower($named);
Please login to merge, or discard this patch.