Test Setup Failed
Push — master ( 9340e9...95bd49 )
by he
05:10
created
app/Console/Commands/Migrations/TopicMigration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Hustoj/Hashing/Hasher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Entities/Solution.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
app/Entities/Team.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Listeners/LoginListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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'],
Please login to merge, or discard this patch.
app/Http/Middleware/AuthorizeContest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Web/ProblemController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Controllers/Web/SolutionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function create($id)
52 52
     {
53
-        if (! auth()->user()) {
53
+        if (!auth()->user()) {
54 54
             return redirect(route('problem.view', ['problem' => $id]))->withErrors(__('Login first'));
55 55
         }
56 56
 
57 57
         /** @var Problem $problem */
58 58
         $problem = app(ProblemRepository::class)->findOrFail($id);
59 59
 
60
-        if (! config('hustoj.special_judge_enabled') && $problem->isSpecialJudge()) {
60
+        if (!config('hustoj.special_judge_enabled') && $problem->isSpecialJudge()) {
61 61
             return redirect(route('problem.view', ['problem' => $id]))
62 62
                 ->withErrors(__('Special judge current disabled!'));
63 63
         }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         /** @var \App\Entities\Solution $solution */
97 97
         $solution = app(SolutionRepository::class)->findOrFail($id);
98
-        if (! can_view_code($solution)) {
98
+        if (!can_view_code($solution)) {
99 99
             return redirect(route('solution.index'))->withErrors(__('You have no permission access solution source'));
100 100
         }
101 101
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         /** @var \App\Entities\Solution $solution */
108 108
         $solution = app(SolutionRepository::class)->findOrFail($id);
109
-        if (! can_view_code($solution)) {
109
+        if (!can_view_code($solution)) {
110 110
             return back()->withErrors(__('You cannot access this solution'));
111 111
         }
112 112
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         /** @var \App\Entities\Solution $solution */
119 119
         $solution = app(SolutionRepository::class)->findOrFail($id);
120
-        if (! can_view_code($solution)) {
120
+        if (!can_view_code($solution)) {
121 121
             return back()->withErrors(__('You cannot access this solution'));
122 122
         }
123 123
 
Please login to merge, or discard this patch.