Passed
Push — master ( 72fffe...b949dd )
by Ferry
04:19
created
src/controllers/DeveloperPluginStoreController.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
                 rrmdir(app_path("CBPlugins/".$key));
104 104
 
105 105
                 return response()->json(['status'=>true, 'message'=>'Plugin has been uninstalled!']);
106
-            }else{
106
+            } else{
107 107
                 return response()->json(['status'=>false,'message'=>'Failed to uninstall, plugin is not found']);
108 108
             }
109
-        }else {
109
+        } else {
110 110
             return response()->json(['status'=>false,'message'=>'Failed to uninstall, plugin key is not found']);
111 111
         }
112 112
     }
@@ -118,8 +118,7 @@  discard block
 block discarded – undo
118 118
             if (( $file != '.' ) && ( $file != '..' )) {
119 119
                 if ( is_dir($src . '/' . $file) ) {
120 120
                     $this->recursiveCopy($src . '/' . $file,$dst . '/' . $file);
121
-                }
122
-                else {
121
+                } else {
123 122
                     copy($src . '/' . $file,$dst . '/' . $file);
124 123
                 }
125 124
             }
@@ -165,7 +164,9 @@  discard block
 block discarded – undo
165 164
                         fclose($temp);
166 165
 
167 166
                         // Rename
168
-                        if(file_exists(app_path("CBPlugins/".$key))) rrmdir(app_path("CBPlugins/".$key));
167
+                        if(file_exists(app_path("CBPlugins/".$key))) {
168
+                            rrmdir(app_path("CBPlugins/".$key));
169
+                        }
169 170
                         rename(app_path("CBPlugins/".$dirName), app_path("CBPlugins/".$key));
170 171
 
171 172
                         // Read Plugin JSON
@@ -192,7 +193,7 @@  discard block
 block discarded – undo
192 193
                     }
193 194
                 }
194 195
 
195
-            }else{
196
+            } else{
196 197
                 return response()->json(['status'=>false,'message'=>'Failed to install/update, plugin key is not found']);
197 198
             }
198 199
         } catch (\Exception $e) {
Please login to merge, or discard this patch.