Passed
Push — dev5 ( 1c1697...6a3ae7 )
by Ron
08:21
created
app/Http/Controllers/TechTips/TechTipsController.php 1 patch
Braces   +18 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,14 +53,17 @@  discard block
 block discarded – undo
53 53
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray());
54 54
 
55 55
         //  See if there are any search paramaters entered
56
-        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType'])) {
56
+        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType']))
57
+        {
57 58
             //  No search paramaters, send all tech tips
58 59
             $tips = new TechTipsCollection(
59 60
                 TechTips::orderBy('created_at', 'DESC')
60 61
                     ->with('SystemTypes')
61 62
                     ->paginate($request->pagination['perPage'])
62 63
             );
63
-        } else {
64
+        }
65
+        else
66
+        {
64 67
             $article = isset($request->search['articleType']) ? true : false;
65 68
             $system  = isset($request->search['systemType'])  ? true : false;
66 69
             //  Search paramaters, filter results
@@ -151,7 +154,8 @@  discard block
 block discarded – undo
151 154
         $save = $receiver->receive();
152 155
 
153 156
         //  See if the uploade has finished
154
-        if ($save->isFinished()) {
157
+        if ($save->isFinished())
158
+        {
155 159
             $this->saveFile($save->getFile());
156 160
 
157 161
             return 'uploaded successfully';
@@ -252,8 +256,7 @@  discard block
 block discarded – undo
252 256
         if(!$tipData->supressEmail)
253 257
         {
254 258
             $details = TechTips::find($tipID);
255
-            $users = User::whereHas('UserSettings', function($query)
256
-            {
259
+            $users = User::whereHas('UserSettings', function($query) {
257 260
                 $query->where('em_tech_tip', 1);
258 261
             })->get();
259 262
 
@@ -267,7 +270,8 @@  discard block
 block discarded – undo
267 270
     //  Details controller - will move to the show controller with just the tech tip id
268 271
     public function details($id, $subject)
269 272
     {
270
-        if (session()->has('newTipFile')) {
273
+        if (session()->has('newTipFile'))
274
+        {
271 275
             session()->forget('newTipFile');
272 276
         }
273 277
 
@@ -301,7 +305,8 @@  discard block
 block discarded – undo
301 305
     {
302 306
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
303 307
 
304
-        switch ($action) {
308
+        switch ($action)
309
+        {
305 310
             case 'add':
306 311
                 TechTipFavs::create([
307 312
                     'user_id' => Auth::user()->user_id,
@@ -330,7 +335,8 @@  discard block
 block discarded – undo
330 335
         $this->authorize('hasAccess', 'Edit Tech Tip');
331 336
         $tipData = TechTips::where('tip_id', $id)->with('User')->with('SystemTypes')->with('TechTipTypes')->first();
332 337
 
333
-        if (!$tipData) {
338
+        if (!$tipData)
339
+        {
334 340
             return view('tips.tipNotFound');
335 341
         }
336 342
 
@@ -363,7 +369,8 @@  discard block
 block discarded – undo
363 369
         $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));
364 370
 
365 371
         //  Verify if there is a file to be processed or not
366
-        if ($receiver->isUploaded() === false || $request->_completed) {
372
+        if ($receiver->isUploaded() === false || $request->_completed)
373
+        {
367 374
             $this->storeUpdatedTip($request, $id);
368 375
             Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id);
369 376
             return response()->json(['tip_id' => $id]);
@@ -373,7 +380,8 @@  discard block
 block discarded – undo
373 380
         $save = $receiver->receive();
374 381
 
375 382
         //  See if the uploade has finished
376
-        if ($save->isFinished()) {
383
+        if ($save->isFinished())
384
+        {
377 385
             $this->saveFile($save->getFile(), $id);
378 386
 
379 387
             return 'uploaded successfully';
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/CategoriesController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
     {
78 78
         Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name);
79 79
 
80
-        try {
80
+        try
81
+        {
81 82
             SystemCategories::find($id)->delete();
82 83
             Log::notice('Category ID '.$id.' deleted by '.Auth::user()->full_name);
83 84
             return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']);
Please login to merge, or discard this patch.