Test Setup Failed
Pull Request — master (#21)
by he
06:17
created
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.
app/Http/Controllers/Web/ContestController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
                 ->withErrors('Contest is End!');
71 71
         }
72 72
 
73
-        if (! auth()->user()) {
73
+        if (!auth()->user()) {
74 74
             return redirect(route('contest.view', $contest->id))
75 75
                 ->withErrors('Login first');
76 76
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Web/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
     {
45 45
         /** @var User $user */
46 46
         $user = app(UserService::class)->findByName($username);
47
-        if (! $user) {
47
+        if (!$user) {
48 48
             // user may not exist
49 49
             return redirect(route('home'))->withErrors('user is not exist!');
50 50
         }
51 51
 
52
-        if (! $user->isActive()) {
52
+        if (!$user->isActive()) {
53 53
             return back()->withErrors('User is not found!');
54 54
         }
55 55
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ProblemController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         if ($problem) {
83 83
             $fs = new Filesystem();
84 84
             $path = config('hustoj.data_path').'/'.$id;
85
-            if (! $fs->exists($path)) {
85
+            if (!$fs->exists($path)) {
86 86
                 $fs->makeDirectory($path);
87 87
             }
88 88
             $files = $fs->files($path);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         if ($problem && request()->hasFile('files')) {
106 106
             $fs = new Filesystem();
107 107
             $path = config('hustoj.data_path').'/'.$id;
108
-            if (! $fs->exists($path)) {
108
+            if (!$fs->exists($path)) {
109 109
                 $fs->makeDirectory($path);
110 110
             }
111 111
             /** @var UploadedFile[] $files */
Please login to merge, or discard this patch.
app/Http/Requests/Judger/JudgerRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function getJudger()
22 22
     {
23
-        if (! $this->judger) {
23
+        if (!$this->judger) {
24 24
             $this->judger = app(JudgerService::class)->find($this->getJudgeId());
25 25
         }
26 26
 
Please login to merge, or discard this patch.
app/Services/Ranking.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     private function addSolution(Solution $solution)
48 48
     {
49
-        if (! array_key_exists($solution->user_id, $this->teams)) {
49
+        if (!array_key_exists($solution->user_id, $this->teams)) {
50 50
             $this->teams[$solution->user_id] = new Team($this->contest);
51 51
         }
52 52
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 
63 63
         /** @var $result Team[] */
64 64
         $result = array_values($this->teams);
65
-        usort($result, function ($team1, $team2) {
66
-            return ! $this->isBetter($team1, $team2);
65
+        usort($result, function($team1, $team2) {
66
+            return !$this->isBetter($team1, $team2);
67 67
         });
68 68
 
69 69
         return $result;
Please login to merge, or discard this patch.
app/Services/DataProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
         $data = [];
19 19
         foreach ($dataInput as $name => $content) {
20
-            if (! array_key_exists($name, $dataOutput)) {
20
+            if (!array_key_exists($name, $dataOutput)) {
21 21
                 $message = 'Problem Data is not match!';
22 22
                 app('log')->error($message, ['pid' => $id]);
23 23
 
Please login to merge, or discard this patch.