@@ -98,7 +98,8 @@ discard block |
||
98 | 98 | // Details controller - will move to the show controller with just the tech tip id |
99 | 99 | public function details($id, $subject) |
100 | 100 | { |
101 | - if(session()->has('newTipFile')) { |
|
101 | + if(session()->has('newTipFile')) |
|
102 | + { |
|
102 | 103 | session()->forget('newTipFile'); |
103 | 104 | } |
104 | 105 | |
@@ -132,7 +133,8 @@ discard block |
||
132 | 133 | { |
133 | 134 | Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
134 | 135 | |
135 | - switch($action) { |
|
136 | + switch($action) |
|
137 | + { |
|
136 | 138 | case 'add': |
137 | 139 | TechTipFavs::create([ |
138 | 140 | 'user_id' => Auth::user()->user_id, |
@@ -161,7 +163,8 @@ discard block |
||
161 | 163 | $this->authorize('hasAccess', 'Edit Tech Tip'); |
162 | 164 | $tipData = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->with('TechTipTypes')->first(); |
163 | 165 | |
164 | - if(!$tipData) { |
|
166 | + if(!$tipData) |
|
167 | + { |
|
165 | 168 | return view('tips.tipNotFound'); |
166 | 169 | } |
167 | 170 | |
@@ -194,7 +197,8 @@ discard block |
||
194 | 197 | $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
195 | 198 | |
196 | 199 | // Verify if there is a file to be processed or not |
197 | - if($receiver->isUploaded() === false || $request->_completed) { |
|
200 | + if($receiver->isUploaded() === false || $request->_completed) |
|
201 | + { |
|
198 | 202 | $this->storeUpdatedTip($request, $id); |
199 | 203 | Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
200 | 204 | return response()->json(['tip_id' => $id]); |
@@ -204,7 +208,8 @@ discard block |
||
204 | 208 | $save = $receiver->receive(); |
205 | 209 | |
206 | 210 | // See if the uploade has finished |
207 | - if($save->isFinished()) { |
|
211 | + if($save->isFinished()) |
|
212 | + { |
|
208 | 213 | $this->saveFile($save->getFile(), $id); |
209 | 214 | |
210 | 215 | return 'uploaded successfully'; |
@@ -161,7 +161,7 @@ |
||
161 | 161 | DIRECTORY_SEPARATOR.$folder.DIRECTORY_SEPARATOR; |
162 | 162 | |
163 | 163 | // Copy files |
164 | - // TODO: Copy composer and package files |
|
164 | + // TODO: Copy composer and package files |
|
165 | 165 | File::copyDirectory($updateFile.'app', base_path().DIRECTORY_SEPARATOR.'app'); |
166 | 166 | File::copyDirectory($updateFile.'bootstrap', base_path().DIRECTORY_SEPARATOR.'bootstrap'); |
167 | 167 | File::copyDirectory($updateFile.'config', base_path().DIRECTORY_SEPARATOR.'config'); |