@@ -67,9 +67,9 @@ |
||
| 67 | 67 | if (!function_exists('display_penalize_time')) { |
| 68 | 68 | function display_penalize_time($seconds) |
| 69 | 69 | { |
| 70 | - $hour = (int)($seconds / (Carbon::SECONDS_PER_MINUTE * Carbon::MINUTES_PER_HOUR)); |
|
| 70 | + $hour = (int) ($seconds / (Carbon::SECONDS_PER_MINUTE * Carbon::MINUTES_PER_HOUR)); |
|
| 71 | 71 | $seconds -= $hour * Carbon::SECONDS_PER_MINUTE * Carbon::MINUTES_PER_HOUR; |
| 72 | - $minute = (int)($seconds / Carbon::SECONDS_PER_MINUTE); |
|
| 72 | + $minute = (int) ($seconds / Carbon::SECONDS_PER_MINUTE); |
|
| 73 | 73 | $leftSeconds = $seconds % Carbon::SECONDS_PER_MINUTE; |
| 74 | 74 | |
| 75 | 75 | return sprintf('%d:%02d:%02d', $hour, $minute, $leftSeconds); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | if ($problem) { |
| 41 | 41 | $dp = app(DataProvider::class); |
| 42 | 42 | |
| 43 | - $path = $dp->getDataPath($id) . $name; |
|
| 43 | + $path = $dp->getDataPath($id).$name; |
|
| 44 | 44 | return response()->download($path, $name); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | /** @var $result Team[] */ |
| 65 | 65 | $result = array_values($this->teams); |
| 66 | - usort($result, function ($team1, $team2) { |
|
| 66 | + usort($result, function($team1, $team2) { |
|
| 67 | 67 | return !$this->isBetter($team1, $team2); |
| 68 | 68 | }); |
| 69 | 69 | |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | */ |
| 74 | 74 | public function isSpecialJudge() |
| 75 | 75 | { |
| 76 | - return (int)$this->spj === 1; |
|
| 76 | + return (int) $this->spj === 1; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -44,15 +44,15 @@ |
||
| 44 | 44 | { |
| 45 | 45 | $now = Carbon::now()->subDays($days)->setTime(0, 0); |
| 46 | 46 | $logs = $this->getTable()->where('user_id', $user->username) |
| 47 | - ->where('time', $now, '>') |
|
| 48 | - ->orderBy('time', 'asc') |
|
| 49 | - ->get(); |
|
| 47 | + ->where('time', $now, '>') |
|
| 48 | + ->orderBy('time', 'asc') |
|
| 49 | + ->get(); |
|
| 50 | 50 | |
| 51 | 51 | if ($logs->count() < 10) { |
| 52 | 52 | $logs = $this->getTable()->where('user_id', $user->username) |
| 53 | - ->limit(10) |
|
| 54 | - ->orderBy('time', 'desc') |
|
| 55 | - ->get(); |
|
| 53 | + ->limit(10) |
|
| 54 | + ->orderBy('time', 'desc') |
|
| 55 | + ->get(); |
|
| 56 | 56 | $logs = $logs->reverse(); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | Route::prefix('judge') |
| 60 | 60 | // ->middleware('judge') |
| 61 | - ->namespace($this->namespace) |
|
| 62 | - ->group(base_path('routes/judge.php')); |
|
| 61 | + ->namespace($this->namespace) |
|
| 62 | + ->group(base_path('routes/judge.php')); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -72,15 +72,15 @@ discard block |
||
| 72 | 72 | protected function mapWebRoutes() |
| 73 | 73 | { |
| 74 | 74 | Route::middleware('web') |
| 75 | - ->namespace($this->namespace) |
|
| 76 | - ->group(base_path('routes/web.php')); |
|
| 75 | + ->namespace($this->namespace) |
|
| 76 | + ->group(base_path('routes/web.php')); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | private function mapAdminRoutes() |
| 80 | 80 | { |
| 81 | 81 | Route::prefix('admin') |
| 82 | - ->middleware('admin') |
|
| 83 | - ->namespace($this->namespace) |
|
| 84 | - ->group(base_path('routes/admin.php')); |
|
| 82 | + ->middleware('admin') |
|
| 83 | + ->namespace($this->namespace) |
|
| 84 | + ->group(base_path('routes/admin.php')); |
|
| 85 | 85 | } |
| 86 | 86 | } |