Passed
Push — master ( 46d43a...ae46ae )
by John
09:19 queued 04:28
created
app/Http/Controllers/Contest/BoardController.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,9 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         $editor_left_width = $accountModel->getExtra(Auth::user()->id, 'editor_left_width');
110
-        if(empty($editor_left_width)) $editor_left_width='40';
110
+        if(empty($editor_left_width)) {
111
+            $editor_left_width='40';
112
+        }
111 113
 
112 114
         return view('contest.board.editor', [
113 115
             'page_title'=>"Problem Detail",
@@ -154,10 +156,10 @@  discard block
 block discarded – undo
154 156
             if($i != 0) {
155 157
                 if($r['score'] == $contestRank[$i-1]['score'] && $r['penalty'] == $contestRank[$i-1]['penalty']){
156 158
                     $r['rank'] = $contestRank[$i-1]['rank'];
157
-                }else{
159
+                } else{
158 160
                     $r['rank'] = $i + 1;
159 161
                 }
160
-            }else{
162
+            } else{
161 163
                 $r['rank'] = 1;
162 164
             }
163 165
         }
Please login to merge, or discard this patch.
app/Models/GroupModel.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,7 +115,9 @@  discard block
 block discarded – undo
115 115
     public function details($gcode)
116 116
     {
117 117
         $basic_info=DB::table($this->tableName)->where(["gcode"=>$gcode])->first();
118
-        if(empty($basic_info)) return [];
118
+        if(empty($basic_info)) {
119
+            return [];
120
+        }
119 121
         $basic_info["members"]=$this->countGroupMembers($basic_info["gid"]);
120 122
         $basic_info["tags"]=$this->getGroupTags($basic_info["gid"]);
121 123
         $basic_info["create_time_foramt"]=date_format(date_create($basic_info["create_time"]), 'M jS, Y');
@@ -163,7 +165,9 @@  discard block
 block discarded – undo
163 165
         foreach ($user_list as &$u) {
164 166
             $u["role_parsed"]=$this->role[$u["role"]];
165 167
             $u["role_color"]=$this->role_color[$u["role"]];
166
-            if(is_null($u["sub_group"])) $u["sub_group"]="None";
168
+            if(is_null($u["sub_group"])) {
169
+                $u["sub_group"]="None";
170
+            }
167 171
         }
168 172
         return $user_list;
169 173
     }
@@ -232,7 +236,7 @@  discard block
 block discarded – undo
232 236
             ->where('gid',$gid)
233 237
             ->distinct()
234 238
             ->get()->all();
235
-        }else{
239
+        } else{
236 240
             $tags =  DB::table('group_problem_tag')
237 241
             ->select('tag')
238 242
             ->where('gid', $gid)
@@ -266,7 +270,7 @@  discard block
 block discarded – undo
266 270
         foreach($problems as $key => $value){
267 271
             if($contestModel->judgeClearance($value['cid'],$user_id) != 3){
268 272
                 unset($problems[$key]);
269
-            }else{
273
+            } else{
270 274
                 $problems[$key]['tags'] = $this->problemTags($gid,$value['pid']);
271 275
             }
272 276
         }
@@ -327,7 +331,9 @@  discard block
 block discarded – undo
327 331
     public function judgeEmailClearance($gid, $email)
328 332
     {
329 333
         $user=DB::table("users")->where(["email"=>$email])->first();
330
-        if(empty($user)) return -4;
334
+        if(empty($user)) {
335
+            return -4;
336
+        }
331 337
         $ret=DB::table("group_member")->where([
332 338
             "gid"=>$gid,
333 339
             "uid"=>$user["id"],
@@ -460,7 +466,7 @@  discard block
 block discarded – undo
460 466
                 if(!empty($last_cr)){
461 467
                     if($cr['solved'] == $last_cr['solved'] && $cr['penalty'] == $last_cr['penalty'] ){
462 468
                         $rank = $last_rank;
463
-                    }else{
469
+                    } else{
464 470
                         $rank = $index;
465 471
                         $last_rank = $rank;
466 472
                     }
Please login to merge, or discard this patch.