Completed
Pull Request — master (#3546)
by jxlwqq
04:12
created
src/Console/PermissionCommand.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -111,6 +111,9 @@  discard block
 block discarded – undo
111 111
         ];
112 112
     }
113 113
 
114
+    /**
115
+     * @param string $permission
116
+     */
114 117
     private function generateHttpMethod($permission)
115 118
     {
116 119
         switch ($permission) {
@@ -132,6 +135,9 @@  discard block
 block discarded – undo
132 135
         return $http_method;
133 136
     }
134 137
 
138
+    /**
139
+     * @param string $permission
140
+     */
135 141
     private function generateHttpPath($table, $permission)
136 142
     {
137 143
         $resource = Str::kebab(Str::camel($table));
@@ -158,6 +164,9 @@  discard block
 block discarded – undo
158 164
         return $http_path;
159 165
     }
160 166
 
167
+    /**
168
+     * @param string $permission
169
+     */
161 170
     private function generateSlug($table, $permission)
162 171
     {
163 172
         return Str::kebab(Str::camel($table)) . '.' . $permission;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
         $resource = Str::kebab(Str::camel($table));
138 138
         switch ($permission) {
139 139
             case 'create':
140
-                $http_path = '/' . $resource;
140
+                $http_path = '/'.$resource;
141 141
                 break;
142 142
             case 'edit':
143
-                $http_path = '/' . $resource . '/*';
143
+                $http_path = '/'.$resource.'/*';
144 144
                 break;
145 145
             case 'delete':
146
-                $http_path = '/' . $resource . '/*';
146
+                $http_path = '/'.$resource.'/*';
147 147
                 break;
148 148
             case 'index':
149
-                $http_path = '/' . $resource;
149
+                $http_path = '/'.$resource;
150 150
                 break;
151 151
             case 'view':
152
-                $http_path = '/' . $resource . '/*';
152
+                $http_path = '/'.$resource.'/*';
153 153
                 break;
154 154
             default:
155 155
                 $http_path = '';
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 
161 161
     private function generateSlug($table, $permission)
162 162
     {
163
-        return Str::kebab(Str::camel($table)) . '.' . $permission;
163
+        return Str::kebab(Str::camel($table)).'.'.$permission;
164 164
     }
165 165
 
166 166
     private function generateName($table, $permission_zh)
167 167
     {
168
-        return Str::upper(Str::kebab(Str::camel($table))) . $permission_zh;
168
+        return Str::upper(Str::kebab(Str::camel($table))).$permission_zh;
169 169
     }
170 170
 }
Please login to merge, or discard this patch.