@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | protected function mapWebRoutes() |
53 | 53 | { |
54 | 54 | Route::middleware('web') |
55 | - ->namespace($this->namespace) |
|
56 | - ->group(base_path('routes/web.php')); |
|
55 | + ->namespace($this->namespace) |
|
56 | + ->group(base_path('routes/web.php')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | protected function mapApiRoutes() |
67 | 67 | { |
68 | 68 | Route::prefix('api') |
69 | - ->middleware('api') |
|
70 | - ->namespace($this->namespace) |
|
71 | - ->group(base_path('routes/api.php')); |
|
69 | + ->middleware('api') |
|
70 | + ->namespace($this->namespace) |
|
71 | + ->group(base_path('routes/api.php')); |
|
72 | 72 | } |
73 | 73 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $statusCode=200; |
15 | 15 | } |
16 | 16 | $output=[ |
17 | - 'ret' => $statusCode, |
|
17 | + 'ret' => $statusCode, |
|
18 | 18 | 'desc' => is_null($desc) ? self::desc($statusCode) : $desc, |
19 | 19 | 'data' => $data |
20 | 20 | ]; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $statusCode=1000; |
28 | 28 | } |
29 | 29 | $output=[ |
30 | - 'ret' => $statusCode, |
|
30 | + 'ret' => $statusCode, |
|
31 | 31 | 'desc' => is_null($desc) ? self::desc($statusCode) : $desc, |
32 | 32 | 'data' => $data |
33 | 33 | ]; |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | '451' => "Unavailable For Legal Reasons", |
45 | 45 | |
46 | 46 | '1000' => "Unspecified Response", /** Under normal condictions those errors shouldn't been displayed to end users |
47 | - * unless they attempt to do so, some submissions should be intercepted |
|
48 | - * by the frontend before the request sended |
|
49 | - */ |
|
47 | + * unless they attempt to do so, some submissions should be intercepted |
|
48 | + * by the frontend before the request sended |
|
49 | + */ |
|
50 | 50 | '1001' => "Internal Sever Error", |
51 | 51 | '1002' => "Service Currently Unavailable", |
52 | 52 | '1003' => "Missing Params", |
@@ -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 | } |
@@ -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 | } |
@@ -65,13 +65,17 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -992,7 +992,7 @@ |
||
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 { |
@@ -153,7 +153,7 @@ |
||
153 | 153 | ->where( |
154 | 154 | function ($query) { |
155 | 155 | $query->where('public', 1) |
156 | - ->where('audit_status', 1); |
|
156 | + ->where('audit_status', 1); |
|
157 | 157 | } |
158 | 158 | ) |
159 | 159 | ->orWhere( |
@@ -39,7 +39,9 @@ |
||
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"]); |