Passed
Pull Request — master (#88)
by Chenyi
04:29
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
@@ -64,13 +64,17 @@  discard block
 block discarded – undo
64 64
 
65 65
     public static function getColor($rankTitle)
66 66
     {
67
-        if(is_null($rankTitle)) return "";
67
+        if(is_null($rankTitle)) {
68
+            return "";
69
+        }
68 70
         return self::$casualRanking[$rankTitle];
69 71
     }
70 72
 
71 73
     public static function getProfessionalColor($rankTitle)
72 74
     {
73
-        if(is_null($rankTitle)) return self::$professionalRanking["None"];
75
+        if(is_null($rankTitle)) {
76
+            return self::$professionalRanking["None"];
77
+        }
74 78
         return self::$professionalRanking[$rankTitle];
75 79
     }
76 80
 
@@ -165,7 +169,9 @@  discard block
 block discarded – undo
165 169
     private function getRankTitle($rankVal)
166 170
     {
167 171
         foreach($this->casualRankingPer as $title=>$c){
168
-            if($rankVal<=$c) return $title;
172
+            if($rankVal<=$c) {
173
+                return $title;
174
+            }
169 175
         }
170 176
         return Arr::last($this->casualRankingPer);
171 177
     }
@@ -173,7 +179,9 @@  discard block
 block discarded – undo
173 179
     private function getProfessionalTitle($rankVal)
174 180
     {
175 181
         foreach($this->professionalRankingPer as $title=>$point) {
176
-            if($rankVal >= $point) return $title;
182
+            if($rankVal >= $point) {
183
+                return $title;
184
+            }
177 185
         }
178 186
         return Arr::last($this->professionalRankingPer);
179 187
     }
Please login to merge, or discard this patch.