Passed
Pull Request — master (#610)
by John
10:48
created
app/Jobs/AntiCheat.php 1 patch
Braces   +17 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,7 +57,9 @@  discard block
 block discarded – undo
57 57
         $cid=$this->cid;
58 58
         $contest=EloquentContestModel::find($cid);
59 59
 
60
-        if(!$contest->isJudgingComplete()) throw new Exception('Judging Incompleted');
60
+        if(!$contest->isJudgingComplete()) {
61
+            throw new Exception('Judging Incompleted');
62
+        }
61 63
 
62 64
         $acceptedSubmissions=$contest->submissions->whereIn('verdict', [
63 65
             'Accepted',
@@ -79,8 +81,11 @@  discard block
 block discarded – undo
79 81
                 $lang=$this->supportLang[$lang];
80 82
                 $ext=$lang;
81 83
                 Storage::put("contest/anticheat/$cid/raw/$prob/$lang/[$submission->uid][$submission->sid].$ext", $submission->solution);
82
-                if(!isset($probLangs[$prob][$lang])) $probLangs[$prob][$lang]=1;
83
-                else $probLangs[$prob][$lang]++;
84
+                if(!isset($probLangs[$prob][$lang])) {
85
+                    $probLangs[$prob][$lang]=1;
86
+                } else {
87
+                    $probLangs[$prob][$lang]++;
88
+                }
84 89
                 $totProb++;
85 90
             }
86 91
         }
@@ -148,13 +153,19 @@  discard block
 block discarded – undo
148 153
     private function afterWork($cid,$prob,$lang, $rawContent)
149 154
     {
150 155
         foreach(preg_split('~[\r\n]+~', $rawContent) as $line){
151
-            if(blank($line) or ctype_space($line)) continue;
156
+            if(blank($line) or ctype_space($line)) {
157
+                continue;
158
+            }
152 159
             // [3057][64659].c++ consists for 100 % of [3057][64679].c++ material
153 160
             $line=explode('%', $line);
154
-            if(!isset($line[1])) continue;
161
+            if(!isset($line[1])) {
162
+                continue;
163
+            }
155 164
             [$uid1,$sid1,$percentage]=sscanf($line[0], "[%d][%d].$lang consists for %d ");
156 165
             [$uid2,$sid2]=sscanf($line[1], " of [%d][%d].$lang material");
157
-            if($uid1==$uid2) continue;
166
+            if($uid1==$uid2) {
167
+                continue;
168
+            }
158 169
             $username1=User::find($uid1)->name;
159 170
             $username2=User::find($uid2)->name;
160 171
             $this->retArr[]=[
Please login to merge, or discard this patch.
app/Admin/Controllers/SubmissionController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,9 @@
 block discarded – undo
103 103
             return $this->user->name;
104 104
         });
105 105
         $grid->column("contest_name", __('admin.submissions.contest_name'))->display(function () {
106
-            if(!is_null($this->contest)) return $this->contest->name;
106
+            if(!is_null($this->contest)) {
107
+                return $this->contest->name;
108
+            }
107 109
         });
108 110
         $grid->column("readable_name", __('admin.submissions.readable_name'))->display(function () {
109 111
             return $this->problem->readable_name;
Please login to merge, or discard this patch.
app/Http/Controllers/Ajax/AccountController.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         if(empty($last_send) || time() - $last_send >= 300){
92 92
             $request->session()->put('last_email_send',time());
93 93
             return ResponseModel::success(200,null,0);
94
-        }else{
94
+        } else{
95 95
             $cooldown =  300 - (time() - $last_send);
96 96
             return ResponseModel::success(200,null,$cooldown);
97 97
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         foreach ($input as $key => $value) {
109 109
             if(strlen($value) != 0){
110 110
                 Auth::user()->setExtra($key, $value, 0);
111
-            }else{
111
+            } else{
112 112
                 Auth::user()->setExtra($key, null);
113 113
             }
114 114
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         foreach ($input as $key => $value) {
127 127
             if(strlen($value) != 0){
128 128
                 Auth::user()->setExtra($key, $value, 0);
129
-            }else{
129
+            } else{
130 130
                 Auth::user()->setExtra($key, null);
131 131
             }
132 132
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         foreach ($input as $key => $value) {
145 145
             if(strlen($value) != 0){
146 146
                 Auth::user()->setExtra($key, $value, 0);
147
-            }else{
147
+            } else{
148 148
                 Auth::user()->setExtra($key, null);
149 149
             }
150 150
         }
Please login to merge, or discard this patch.
app/Http/Controllers/OAuth/GithubController.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         try{
38 38
             $github_user = Socialite::driver('github')->user();
39
-        }catch(\Laravel\Socialite\Two\InvalidStateException $e){
39
+        } catch(\Laravel\Socialite\Two\InvalidStateException $e){
40 40
             return redirect()->route('home');
41 41
         }
42 42
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             Auth::user()->setExtra('github_homepage', ($github_user->user)['html_url']);
54 54
             Auth::user()->setExtra('github_token', $github_user->token, 101);
55 55
             return $this->generateSuccessView(Auth::user()->getExtra('github_email'));
56
-        }else{
56
+        } else{
57 57
             $ret = UserExtra::search('github_id', $github_user->id);
58 58
             if(!empty($ret)){
59 59
                 Auth::loginUsingId($ret[0]['uid'], true);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 Auth::user()->setExtra('github_homepage', ($github_user->user)['html_url']);
63 63
                 Auth::user()->setExtra('github_token', $github_user->token, 101);
64 64
                 return redirect()->route('account.dashboard');
65
-            }else{
65
+            } else{
66 66
                 if(config('app.allow_oauth_temp_account')){
67 67
                     try {
68 68
                         $createdUser=User::create([
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                             'password' => '',
72 72
                             'avatar' => '/static/img/avatar/default.png',
73 73
                         ]);
74
-                    }catch(QueryException $exception){
74
+                    } catch(QueryException $exception){
75 75
                         return $this->generateUnknownErrorView();
76 76
                     }
77 77
                     Auth::loginUsingId($createdUser->id, true);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         }
105 105
         if(Auth::user()->getExtra('github_id')){
106 106
             return $this->generateUnbindConfirmView(Auth::user()->email, Auth::user()->getExtra('github_email'));
107
-        }else{
107
+        } else{
108 108
             return $this->generateAlreadyUnbindView();
109 109
         }
110 110
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             Auth::user()->setExtra('github_homepage', null);
122 122
             Auth::user()->setExtra('github_token', null);
123 123
             return $this->generateUnbindSuccessView();
124
-        }else{
124
+        } else{
125 125
             return $this->generateAlreadyUnbindView();
126 126
         }
127 127
     }
Please login to merge, or discard this patch.
app/Http/Controllers/OAuth/AAuthController.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         try{
58 58
             $aauth_user = $this->user(request()->code);
59
-        }catch(Throwable $e){
59
+        } catch(Throwable $e){
60 60
             return redirect()->route('home');
61 61
         }
62 62
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
             Auth::user()->setExtra('aauth_id', $aauth_user->id);
71 71
             Auth::user()->setExtra('aauth_nickname', $aauth_user->name);
72 72
             return $this->generateSuccessView(Auth::user()->getExtra('aauth_nickname'));
73
-        }else{
73
+        } else{
74 74
             $ret = UserExtra::search('aauth_id', $aauth_user->id);
75 75
             if(!empty($ret)){
76 76
                 Auth::loginUsingId($ret[0]['uid'], true);
77 77
                 Auth::user()->setExtra('aauth_nickname', $aauth_user->name);
78 78
                 return redirect()->route('account.dashboard');
79
-            }else{
79
+            } else{
80 80
                 if(config('app.allow_oauth_temp_account')){
81 81
                     try {
82 82
                         $createdUser=User::create([
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                             'password' => '',
86 86
                             'avatar' => '/static/img/avatar/default.png',
87 87
                         ]);
88
-                    }catch(QueryException $exception){
88
+                    } catch(QueryException $exception){
89 89
                         return $this->generateUnknownErrorView();
90 90
                     }
91 91
                     Auth::loginUsingId($createdUser->id, true);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
         if(Auth::user()->getExtra('aauth_id')){
107 107
             return $this->generateUnbindConfirmView(Auth::user()->email, Auth::user()->getExtra('aauth_nickname'));
108
-        }else{
108
+        } else{
109 109
             return $this->generateAlreadyUnbindView();
110 110
         }
111 111
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             Auth::user()->setExtra('aauth_id', null);
120 120
             Auth::user()->setExtra('aauth_nickname', null);
121 121
             return $this->generateUnbindSuccessView();
122
-        }else{
122
+        } else{
123 123
             return $this->generateAlreadyUnbindView();
124 124
         }
125 125
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Contest/BoardController.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
38 38
             if($clearance == 3){
39 39
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
40
-            }else{
40
+            } else{
41 41
                 return Redirect::route('contest.detail', ['cid' => $cid]);
42 42
             }
43 43
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
86 86
             if($clearance == 3){
87 87
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
88
-            }else{
88
+            } else{
89 89
                 return Redirect::route('contest.detail', ['cid' => $cid]);
90 90
             }
91 91
         }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
164 164
             if($clearance == 3){
165 165
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
166
-            }else{
166
+            } else{
167 167
                 return Redirect::route('contest.detail', ['cid' => $cid]);
168 168
             }
169 169
         }
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
             if($i != 0) {
183 183
                 if($r['score'] == $contestRank[$i-1]['score'] && ($contest_rule == 1 ? ($r['penalty'] == $contestRank[$i-1]['penalty']) : 1) ){
184 184
                     $r['rank'] = $contestRank[$i-1]['rank'];
185
-                }else{
185
+                } else{
186 186
                     $r['rank'] = $i + 1;
187 187
                 }
188
-            }else{
188
+            } else{
189 189
                 $r['rank'] = 1;
190 190
             }
191 191
         }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
227 227
             if($clearance == 3){
228 228
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
229
-            }else{
229
+            } else{
230 230
                 return Redirect::route('contest.detail', ['cid' => $cid]);
231 231
             }
232 232
         }
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
269 269
             if($clearance == 3){
270 270
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
271
-            }else{
271
+            } else{
272 272
                 return Redirect::route('contest.detail', ['cid' => $cid]);
273 273
             }
274 274
         }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
307 307
             if($clearance == 3){
308 308
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
309
-            }else{
309
+            } else{
310 310
                 return Redirect::route('contest.detail', ['cid' => $cid]);
311 311
             }
312 312
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         if (!$clearance || time() < strtotime($basicInfo['begin_time'])) {
335 335
             if($clearance == 3){
336 336
                 return Redirect::route('contest.board.admin', ['cid' => $cid]);
337
-            }else{
337
+            } else{
338 338
                 return Redirect::route('contest.detail', ['cid' => $cid]);
339 339
             }
340 340
         }
Please login to merge, or discard this patch.
app/Models/ContestModel.php 1 patch
Braces   +28 added lines, -31 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                     $paginator=$paginator->where(["practice"=>$filter['practice']]);
229 229
                 }
230 230
                 $paginator = $paginator ->paginate(10);
231
-            }elseif($filter['public']=='0'){
231
+            } elseif($filter['public']=='0'){
232 232
                 $paginator=DB::table('group_member')
233 233
                 ->groupBy('contest.cid')
234 234
                 ->select('contest.*')
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 )
259 259
                 ->orderBy('contest.begin_time', 'desc')
260 260
                 ->paginate(10);
261
-            }else{
261
+            } else{
262 262
                 $paginator=DB::table('group_member')
263 263
                 ->groupBy('contest.cid')
264 264
                 ->select('contest.*')
@@ -818,13 +818,13 @@  discard block
 block discarded – undo
818 818
         if(time() < $end_time){
819 819
             if($clearance == 3){
820 820
                 $contestRankRaw=Cache::tags(['contest', 'rank'])->get("contestAdmin$cid");
821
-            }else{
821
+            } else{
822 822
                 $contestRankRaw=Cache::tags(['contest', 'rank'])->get($cid);
823 823
             }
824 824
             if(!isset($contestRankRaw)){
825 825
                 $contestRankRaw=$contest_eloquent->rankRefresh();
826 826
             }
827
-        }else{
827
+        } else{
828 828
             if($clearance == 3){
829 829
                 $contestRankRaw=Cache::tags(['contest', 'rank'])->get("contestAdmin$cid");
830 830
                 if (!isset($contestRankRaw)) {
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
                         $this->storeContestRankInMySQL($cid, $contestRankRaw);
835 835
                     }
836 836
                 }
837
-            }else{
837
+            } else{
838 838
                 $contestRankRaw=$this->getContestRankFromMySQL($cid);
839 839
                 if(!isset($contestRankRaw)){
840 840
                     $contestRankRaw=Cache::tags(['contest', 'rank'])->get($cid);
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
             return DB::table("contest_clarification")->where([
920 920
                 "cid"=>$cid
921 921
             ])->orderBy('created_at', 'desc')->get()->all();
922
-        }else{
922
+        } else{
923 923
             return DB::table("contest_clarification")->where([
924 924
                 "cid"=>$cid
925 925
             ])->where(function ($query) {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
         $filter['pid'] = array_search($filter['ncode'], array_column($problemSet_temp, 'ncode'));
1052 1052
         if($filter['pid']===false){
1053 1053
             $filter['pid'] = is_null($filter['ncode'])?null:-1;
1054
-        }else{
1054
+        } else{
1055 1055
             $filter['pid'] = $problemSet_temp[$filter['pid']]['pid'];
1056 1056
         }
1057 1057
 
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
                     "records"=>[]
1160 1160
                 ];
1161 1161
             }
1162
-        }else{
1162
+        } else{
1163 1163
             if ($basicInfo["status_visibility"]==2) {
1164 1164
                 // View all
1165 1165
                 $paginator=DB::table("submission")->where([
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
             if($ratingCalculator->calculate()){
1413 1413
                 $ratingCalculator->storage();
1414 1414
                 return true;
1415
-            }else{
1415
+            } else{
1416 1416
                 return false;
1417 1417
             }
1418 1418
         } else {
@@ -1461,7 +1461,7 @@  discard block
 block discarded – undo
1461 1461
             $contestRankRaw = $this->contestRankCache($cid);
1462 1462
             Cache::tags(['contest', 'rank'])->put($cid, $contestRankRaw);
1463 1463
             Cache::tags(['contest', 'rank'])->put("contestAdmin$cid", $contestRankRaw);
1464
-        }else{
1464
+        } else{
1465 1465
             DB::table($this->tableName)
1466 1466
                 ->where('cid',$cid)
1467 1467
                 ->update($data);
@@ -1563,8 +1563,7 @@  discard block
 block discarded – undo
1563 1563
                     if(time() > $chache['end_time']){
1564 1564
                         $this->storeContestRankInMySQL($cid, $ret);
1565 1565
                     }
1566
-                }
1567
-                else{
1566
+                } else{
1568 1567
                     $ret=[];
1569 1568
                     $chache=[];
1570 1569
                     $chache['contest_info']=DB::table("contest")->where("cid", $cid)->first();
@@ -1579,7 +1578,7 @@  discard block
 block discarded – undo
1579 1578
                             "cid"=>$cid,
1580 1579
                             "audit"=>1
1581 1580
                         ])->select('uid')->get()->all();
1582
-                    }else{
1581
+                    } else{
1583 1582
                         $submissionUsers=DB::table("submission")->where([
1584 1583
                             "cid"=>$cid
1585 1584
                         ])->where(
@@ -1614,9 +1613,9 @@  discard block
 block discarded – undo
1614 1613
                     Cache::tags(['contest', 'rank'])->put("contestAdmin$cid", $retAdmin);
1615 1614
                 }
1616 1615
             }
1617
-        }catch(LockTimeoutException $e){
1616
+        } catch(LockTimeoutException $e){
1618 1617
             Log::warning("Contest Rank Lock Timed Out");
1619
-        }finally{
1618
+        } finally{
1620 1619
             optional($lock)->release();
1621 1620
         }
1622 1621
     }
@@ -1639,7 +1638,7 @@  discard block
 block discarded – undo
1639 1638
                     return 1;
1640 1639
                 }
1641 1640
             });
1642
-        }else if ($contest_info["rule"]==2){
1641
+        } else if ($contest_info["rule"]==2){
1643 1642
             usort($ret, function ($a, $b) {
1644 1643
                 if ($a["score"]==$b["score"]) {
1645 1644
                     if ($a["solved"]==$b["solved"]) {
@@ -1663,8 +1662,9 @@  discard block
 block discarded – undo
1663 1662
     {
1664 1663
         $id = count($ret);
1665 1664
         foreach($ret as $key => $r){
1666
-            if($r['uid'] == $uid)
1667
-                $id = $key;
1665
+            if($r['uid'] == $uid) {
1666
+                            $id = $key;
1667
+            }
1668 1668
         }
1669 1669
         if ($contest_info["rule"]==1) {
1670 1670
             // ACM/ICPC Mode
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
                 $prob_detail = [];
1673 1673
                 $totPen = 0;
1674 1674
                 $totScore = 0;
1675
-            }else{
1675
+            } else{
1676 1676
                 $prob_detail = $ret[$id]['problem_detail'];
1677 1677
                 $totPen=$ret[$id]['penalty'];
1678 1678
                 $totScore=$ret[$id]['score'];
@@ -1730,7 +1730,7 @@  discard block
 block discarded – undo
1730 1730
                 $prob_detail = [];
1731 1731
                 $totSolved = 0;
1732 1732
                 $totScore = 0;
1733
-            }else{
1733
+            } else{
1734 1734
                 $prob_detail = $ret[$id]['problem_detail'];
1735 1735
                 $totSolved=$ret[$id]['solved'];
1736 1736
                 $totScore=$ret[$id]['score'];
@@ -1796,18 +1796,18 @@  discard block
 block discarded – undo
1796 1796
                 return false;
1797 1797
             }
1798 1798
             return true;
1799
-        }else if($status === 0){
1799
+        } else if($status === 0){
1800 1800
             if($begin_time_new !== null){
1801 1801
                 return false;
1802 1802
             }
1803 1803
             if($end_time_new !== null){
1804 1804
                 if(strtotime($end_time_new) <= time()){
1805 1805
                     return false;
1806
-                }else{
1806
+                } else{
1807 1807
                     return true;
1808 1808
                 }
1809 1809
             }
1810
-        }else{
1810
+        } else{
1811 1811
             return false;
1812 1812
         }
1813 1813
 
@@ -1828,8 +1828,7 @@  discard block
 block discarded – undo
1828 1828
             return DB::table("contest_clarification")->where('ccid','=',$ccid)->update([
1829 1829
                 "public"=>1
1830 1830
             ]);
1831
-        }
1832
-        else
1831
+        } else
1833 1832
         {
1834 1833
             return DB::table("contest_clarification")->where('ccid','=',$ccid)->update([
1835 1834
                 "public"=>0
@@ -1853,7 +1852,7 @@  discard block
 block discarded – undo
1853 1852
             ->whereIn('pid',array_column($contestRank[0]['problem_detail'],'pid'))
1854 1853
             ->select('pid','title')
1855 1854
             ->get()->all();
1856
-        }else{
1855
+        } else{
1857 1856
             $all_problems = [];
1858 1857
         }
1859 1858
         $tags = DB::table('group_problem_tag')
@@ -2004,12 +2003,10 @@  discard block
 block discarded – undo
2004 2003
             $zipFile
2005 2004
                 ->saveAsFile(base_path('storage/app/private/'.$path.$cid.".zip")); // save the archive to a file
2006 2005
                 //->extractTo(base_path('storage/app/private/'.$path)); // extract files to the specified directory
2007
-        }
2008
-        catch(\PhpZip\Exception\ZipException $e){
2006
+        } catch(\PhpZip\Exception\ZipException $e){
2009 2007
             // handle exception
2010 2008
             Log::debug($e);
2011
-        }
2012
-        finally{
2009
+        } finally{
2013 2010
             $zipFile->close();
2014 2011
         }
2015 2012
     }
@@ -2035,7 +2032,7 @@  discard block
 block discarded – undo
2035 2032
             return [
2036 2033
                 'result' => true
2037 2034
             ];
2038
-        }else{
2035
+        } else{
2039 2036
             return [
2040 2037
                 'result' => false,
2041 2038
                 'sid' => $submissions
Please login to merge, or discard this patch.
app/Models/JudgerModel.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,9 @@
 block discarded – undo
67 67
     public function fetchServer($oid=0)
68 68
     {
69 69
         $serverList=DB::table("judge_server");
70
-        if($oid) $serverList=$serverList->where(["oid"=>$oid]);
70
+        if($oid) {
71
+            $serverList=$serverList->where(["oid"=>$oid]);
72
+        }
71 73
         $serverList=$serverList->get()->all();
72 74
         foreach ($serverList as &$server) {
73 75
             $server["status_parsed"]=is_null($server["status"])?self::$status["-1"]:self::$status[$server["status"]];
Please login to merge, or discard this patch.
app/Models/Eloquent/Contest.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
                 $users->add($user);
45 45
             }
46 46
             return $users->unique();
47
-        }else{
47
+        } else{
48 48
             $this->load('submissions.user');
49 49
             if($ignore_frozen){
50 50
                 $frozen_time = $this->frozen_time;
51 51
                 $submissions = $this->submissions()->where('submission_date','<',$frozen_time)->get();
52
-            }else{
52
+            } else{
53 53
                 $submissions = $this->submissions;
54 54
             }
55 55
             $users = collect();
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             });
119 119
             Cache::tags(['contest', 'rank'])->put($this->cid, $ret, 60);
120 120
             return $ret;
121
-        }else{
121
+        } else{
122 122
             // IO Mode
123 123
             $c = new OutdatedContestModel();
124 124
             return $c->contestRankCache($this->cid);
Please login to merge, or discard this patch.