Test Setup Failed
Branch master (ebf609)
by Arafat
13:57
created
Category
app/Helpers/BSForm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     public static function show($method, $action, $data, $submit = [])
8 8
     {
9 9
         echo '<form method="'.$method.'"';
10
-        if (! empty($action) || strlen($action) > 0) {
10
+        if (!empty($action) || strlen($action) > 0) {
11 11
             echo ' action="'.$action.'"';
12 12
         }
13 13
         echo '>';
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public static function close($submit, $text = 'Submit', $class = 'btn btn-success', $data = []): string
51 51
     {
52
-        if (! $submit) {
52
+        if (!$submit) {
53 53
             return '</form>';
54 54
         }
55 55
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $str = '
137 137
         <div class="mb-3">';
138 138
 
139
-        if (! empty($label)) {
139
+        if (!empty($label)) {
140 140
             $str .= '<label for="'.$type.'" class="form-label">'.$label.':</label>';
141 141
         }
142 142
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $str = '
155 155
         <div class="mb-3">';
156 156
 
157
-        if (! empty($label)) {
157
+        if (!empty($label)) {
158 158
             $str .= '<label for="select" class="form-label">'.$label.':</label>';
159 159
         }
160 160
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $str = '
175 175
         <div class="mb-3">';
176 176
 
177
-        if (! empty($label)) {
177
+        if (!empty($label)) {
178 178
             $str .= '<label class="form-label" for="select">'.$label.':</label>';
179 179
         }
180 180
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $str = '
196 196
         <div class="mb-3">';
197 197
 
198
-        if (! empty($label)) {
198
+        if (!empty($label)) {
199 199
             $str .= '<label for="textarea" class="form-label">'.$label.':</label>';
200 200
         }
201 201
 
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->configureRateLimiting();
39 39
 
40
-        $this->routes(function () {
40
+        $this->routes(function() {
41 41
             Route::prefix('api')
42 42
                 ->middleware('api')
43 43
                 ->namespace($this->namespace)
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function configureRateLimiting()
64 64
     {
65
-        RateLimiter::for('api', function (Request $request) {
65
+        RateLimiter::for ('api', function(Request $request) {
66 66
             return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
67 67
         });
68 68
     }
Please login to merge, or discard this patch.
app/Http/Controllers/AuthController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
             'password' => 'required',
52 52
         ]);*/
53 53
 
54
-        if (! auth()->attempt($request->only(['email', 'password']), $request->remember)) {
54
+        if (!auth()->attempt($request->only(['email', 'password']), $request->remember)) {
55 55
             return back()->withErrors('Email or Password is incorrect');
56 56
         }
57 57
 
58 58
         $user = auth()->user();
59 59
 
60
-        if (! empty($request->redir)) {
60
+        if (!empty($request->redir)) {
61 61
             $url = rawurldecode($request->redir);
62 62
         } else {
63 63
             $url = route('user.index');
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
         $user->password = bcrypt($request->password);
74 74
         $user->role = 'user';
75 75
 
76
-        if (! $user->save()) {
76
+        if (!$user->save()) {
77 77
             return back()->withErrors('Something is wrong. Please try again.');
78 78
         }
79 79
 
80 80
         auth()->login($user, true);
81 81
 
82
-        if (! empty($request->redir)) {
82
+        if (!empty($request->redir)) {
83 83
             $url = rawurldecode($request->redir);
84 84
         } else {
85 85
             $url = route('user.index');
Please login to merge, or discard this patch.
app/Http/Controllers/User/AttemptController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             return redirect()->route('user.quizzes.start', $attempt->quiz_id)->withErrors('Please start again.');
42 42
         }
43 43
 
44
-        if (! $attempt->examined_at) {
44
+        if (!$attempt->examined_at) {
45 45
             $attempt->examine();
46 46
         }
47 47
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             ->inRandomOrder()
158 158
             ->take($quiz->total_questions)
159 159
             ->get(['id'])
160
-            ->mapWithKeys(function ($item) {
160
+            ->mapWithKeys(function($item) {
161 161
                 return [$item->id => null];
162 162
             })
163 163
             ->toArray();
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
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if (!$request->expectsJson()) {
18 18
             return route('auth.login');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function register()
36 36
     {
37
-        $this->reportable(function (Throwable $e) {
37
+        $this->reportable(function(Throwable $e) {
38 38
             //
39 39
         });
40 40
     }
Please login to merge, or discard this patch.
app/Models/Attempt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@
 block discarded – undo
50 50
 
51 51
     public function examine()
52 52
     {
53
-        if (! $this->questions) {
53
+        if (!$this->questions) {
54 54
             return false;
55 55
         }
56 56
 
57
-        $questions = $this->questions->mapWithKeys(function ($item) {
57
+        $questions = $this->questions->mapWithKeys(function($item) {
58 58
             return [$item->id => $item->answer];
59 59
         });
60 60
 
Please login to merge, or discard this patch.