@@ -47,7 +47,7 @@ |
||
| 47 | 47 | private function getAdminRole() |
| 48 | 48 | { |
| 49 | 49 | $role = Role::where('name', 'admin')->first(); |
| 50 | - if (! $role) { |
|
| 50 | + if (!$role) { |
|
| 51 | 51 | $role = $this->initialRole(); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public function handle($command) |
| 12 | 12 | { |
| 13 | 13 | $command->info('Migrating Topic...'); |
| 14 | - $this->table('topic')->orderBy('tid', 'asc')->chunk(100, function ($items) { |
|
| 14 | + $this->table('topic')->orderBy('tid', 'asc')->chunk(100, function($items) { |
|
| 15 | 15 | foreach ($items as $item) { |
| 16 | 16 | $this->transform($item); |
| 17 | 17 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $topic->title = $item->title; |
| 27 | 27 | $topic->contest_id = $item->cid; |
| 28 | 28 | $topic->problem_id = $item->pid; |
| 29 | - if (! $topic->contest_id) { |
|
| 29 | + if (!$topic->contest_id) { |
|
| 30 | 30 | $topic->contest_id = 0; |
| 31 | 31 | } |
| 32 | 32 | $user = app(UserService::class)->findByName($item->author_id); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | public function make($value, array $options = []) |
| 43 | 43 | { |
| 44 | 44 | $salt = Arr::get($options, 'salt'); |
| 45 | - if (! $salt) { |
|
| 45 | + if (!$salt) { |
|
| 46 | 46 | $this->generateSalt(); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | public function isFailed() |
| 121 | 121 | { |
| 122 | 122 | // 既不是AC,也不是等待评测,就挂了 |
| 123 | - return ! $this->isAccepted() && ! $this->isPending(); |
|
| 123 | + return !$this->isAccepted() && !$this->isPending(); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | public function isAccepted() |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | private function markProblemAccept($solution) |
| 70 | 70 | { |
| 71 | 71 | $pid = $solution->order; |
| 72 | - if (! array_key_exists($pid, $this->timePassed) || $this->timePassed[$pid] === null) { |
|
| 72 | + if (!array_key_exists($pid, $this->timePassed) || $this->timePassed[$pid] === null) { |
|
| 73 | 73 | $this->timePassed[$pid] = $solution->created_at; |
| 74 | 74 | $this->accepts++; |
| 75 | 75 | } else { |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | private function addFailedCount(Solution $solution) |
| 83 | 83 | { |
| 84 | - if (! array_key_exists($solution->order, $this->waCounts)) { |
|
| 84 | + if (!array_key_exists($solution->order, $this->waCounts)) { |
|
| 85 | 85 | $this->waCounts[$solution->order] = 0; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | public function handle($event) |
| 14 | 14 | { |
| 15 | - if (! $event->user) { |
|
| 15 | + if (!$event->user) { |
|
| 16 | 16 | // no such user in system, don't record it |
| 17 | 17 | $information = [ |
| 18 | 18 | 'name' => $event->credentials['username'], |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** @var \App\Entities\Contest $contest */ |
| 22 | 22 | $contest = app(ContestRepository::class)->findOrFail($contest); |
| 23 | 23 | |
| 24 | - if (! $contest->isAvailable()) { |
|
| 24 | + if (!$contest->isAvailable()) { |
|
| 25 | 25 | return back()->withErrors('Contest not found!'); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | protected function redirectTo($request) |
| 17 | 17 | { |
| 18 | - if (! $request->expectsJson()) { |
|
| 18 | + if (!$request->expectsJson()) { |
|
| 19 | 19 | return route('login'); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | /** @var Problem $problem */ |
| 29 | 29 | $problem = $this->repository->findOrFail($id); |
| 30 | - if (! $problem->isAvailable()) { |
|
| 30 | + if (!$problem->isAvailable()) { |
|
| 31 | 31 | return back()->withErrors('Problem is not found!'); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | /** @var Problem $problem */ |
| 55 | 55 | $problem = $this->repository->findOrFail($id); |
| 56 | - if (! $problem->isAvailable()) { |
|
| 56 | + if (!$problem->isAvailable()) { |
|
| 57 | 57 | return back()->withErrors('Problem is not found!'); |
| 58 | 58 | } |
| 59 | 59 | |