Passed
Pull Request — master (#86)
by Chenyi
05:01
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/RankModel.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
     public static function getColor($rankTitle)
48 48
     {
49
-        if(is_null($rankTitle)) return "";
49
+        if(is_null($rankTitle)) {
50
+            return "";
51
+        }
50 52
         return self::$casualRanking[$rankTitle];
51 53
     }
52 54
 
@@ -99,7 +101,9 @@  discard block
 block discarded – undo
99 101
     private function getRankTitle($rankVal)
100 102
     {
101 103
         foreach($this->casualRankingPer as $title=>$c){
102
-            if($rankVal<=$c) return $title;
104
+            if($rankVal<=$c) {
105
+                return $title;
106
+            }
103 107
         }
104 108
         return Arr::last($this->casualRankingPer);
105 109
     }
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.