Passed
Push — master ( a95f92...49e434 )
by Chenyi
07:35 queued 03:40
created
app/Babel/Judger/Judge.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -396,7 +396,9 @@
 block discarded – undo
396 396
     private function get_last_uva($earliest)
397 397
     {
398 398
         $ret=[];
399
-        if (!$earliest) return $ret;
399
+        if (!$earliest) {
400
+            return $ret;
401
+        }
400 402
 
401 403
         $judger=new JudgerModel();
402 404
         $judgerDetail=$judger->detail($earliest['jid']);
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
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
     {
62 62
         $curl=curl_init();
63 63
 
64
-        if($curl===false) return [];
64
+        if($curl===false) {
65
+            return [];
66
+        }
65 67
 
66 68
         curl_setopt_array($curl, array(
67 69
             CURLOPT_PORT => $port,
Please login to merge, or discard this patch.
app/Babel/Crawler/Crawler.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,8 @@
 block discarded – undo
40 40
         if ($name=="UVa") {
41 41
             $crawler=new UVa($action, $con, $cached);
42 42
         }
43
-        if (isset($crawler)) $this->data=$crawler->data;
43
+        if (isset($crawler)) {
44
+            $this->data=$crawler->data;
45
+        }
44 46
     }
45 47
 }
Please login to merge, or discard this patch.
app/Models/Rating/RatingCalculator.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             $mid = floor(($right + $left)/2);
79 79
             if($this->getSeed($mid) < $rank){
80 80
                 $right = $mid;
81
-            }else{
81
+            } else{
82 82
                 $left = $mid;
83 83
             }
84 84
         }
Please login to merge, or discard this patch.
app/Models/RankModel.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,13 +65,17 @@  discard block
 block discarded – undo
65 65
 
66 66
     public static function getColor($rankTitle)
67 67
     {
68
-        if(is_null($rankTitle)) return "";
68
+        if(is_null($rankTitle)) {
69
+            return "";
70
+        }
69 71
         return self::$casualRanking[$rankTitle];
70 72
     }
71 73
 
72 74
     public static function getProfessionalColor($rankTitle)
73 75
     {
74
-        if(is_null($rankTitle)) return self::$professionalRanking["None"];
76
+        if(is_null($rankTitle)) {
77
+            return self::$professionalRanking["None"];
78
+        }
75 79
         return self::$professionalRanking[$rankTitle];
76 80
     }
77 81
 
@@ -166,7 +170,9 @@  discard block
 block discarded – undo
166 170
     public function getRankTitle($rankVal)
167 171
     {
168 172
         foreach($this->casualRankingPer as $title=>$c){
169
-            if($rankVal<=$c) return $title;
173
+            if($rankVal<=$c) {
174
+                return $title;
175
+            }
170 176
         }
171 177
         return Arr::last($this->casualRankingPer);
172 178
     }
@@ -174,7 +180,9 @@  discard block
 block discarded – undo
174 180
     public static function getProfessionalTitle($rankVal)
175 181
     {
176 182
         foreach(self::$professionalRankingPer as $title=>$point) {
177
-            if($rankVal >= $point) return $title;
183
+            if($rankVal >= $point) {
184
+                return $title;
185
+            }
178 186
         }
179 187
         return Arr::last(self::$professionalRankingPer);
180 188
     }
Please login to merge, or discard this patch.
app/Models/ContestModel.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -992,7 +992,7 @@
 block discarded – undo
992 992
             if($ratingCalculator->calculate()){
993 993
                 $ratingCalculator->storage();
994 994
                 return true;
995
-            }else{
995
+            } else{
996 996
                 return false;
997 997
             }
998 998
         } else {
Please login to merge, or discard this patch.
app/Http/Controllers/GroupController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@
 block discarded – undo
39 39
         $groupModel=new GroupModel();
40 40
         $contestModel=new ContestModel();
41 41
         $basic_info=$groupModel->details($gcode);
42
-        if(empty($basic_info)) return Redirect::route('group_index');
42
+        if(empty($basic_info)) {
43
+            return Redirect::route('group_index');
44
+        }
43 45
         $my_profile=$groupModel->userProfile(Auth::user()->id, $basic_info["gid"]);
44 46
         $clearance=$groupModel->judgeClearance($basic_info["gid"], Auth::user()->id);
45 47
         $member_list=$groupModel->userList($basic_info["gid"]);
Please login to merge, or discard this patch.
app/Models/AccountModel.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
                 $ret['secret_level'] = $secret_level;
154 154
             }
155 155
             DB::table('users_extra')->where('uid',$uid)->where('key',$key)->update($ret);
156
-        }else{
156
+        } else{
157 157
             return DB::table('users_extra')->insertGetId(
158 158
                 [
159 159
                     'uid' => $uid,
Please login to merge, or discard this patch.
app/Models/GroupModel.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,9 @@  discard block
 block discarded – undo
79 79
     public function details($gcode)
80 80
     {
81 81
         $basic_info=DB::table($this->tableName)->where(["gcode"=>$gcode])->first();
82
-        if(empty($basic_info)) return [];
82
+        if(empty($basic_info)) {
83
+            return [];
84
+        }
83 85
         $basic_info["members"]=$this->countGroupMembers($basic_info["gid"]);
84 86
         $basic_info["tags"]=$this->getGroupTags($basic_info["gid"]);
85 87
         $basic_info["create_time_foramt"]=date_format(date_create($basic_info["create_time"]), 'M jS, Y');
@@ -120,7 +122,9 @@  discard block
 block discarded – undo
120 122
         foreach ($user_list as &$u) {
121 123
             $u["role_parsed"]=$this->role[$u["role"]];
122 124
             $u["role_color"]=$this->role_color[$u["role"]];
123
-            if(is_null($u["sub_group"])) $u["sub_group"]="None";
125
+            if(is_null($u["sub_group"])) {
126
+                $u["sub_group"]="None";
127
+            }
124 128
         }
125 129
         return $user_list;
126 130
     }
Please login to merge, or discard this patch.