@@ -396,7 +396,9 @@ |
||
| 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']); |
@@ -61,7 +61,9 @@ |
||
| 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, |
@@ -40,6 +40,8 @@ |
||
| 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 | } |
@@ -46,7 +46,9 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -78,7 +78,7 @@ |
||
| 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 | } |