Passed
Pull Request — main (#49)
by Thierry
14:14
created
app/Http/Middleware/VerifyCsrfToken.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,14 +35,15 @@
 block discarded – undo
35 35
         try
36 36
         {
37 37
             return parent::handle($request, $next);
38
-        }
39
-        catch(TokenMismatchException $e)
38
+        } catch(TokenMismatchException $e)
40 39
         {
41 40
             $jaxon = App::make(Jaxon::class);
42
-            if($jaxon->canProcessRequest()) // We have an ajax request with Jaxon
41
+            if($jaxon->canProcessRequest()) {
42
+                // We have an ajax request with Jaxon
43 43
             {
44 44
                 throw new AuthenticationException();
45 45
             }
46
+            }
46 47
 
47 48
             throw $e;
48 49
         }
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,10 +21,12 @@
 block discarded – undo
21 21
     protected function unauthenticated($request, array $guards)
22 22
     {
23 23
         $jaxon = App::make(Jaxon::class);
24
-        if($jaxon->canProcessRequest()) // We have an ajax request with Jaxon
24
+        if($jaxon->canProcessRequest()) {
25
+            // We have an ajax request with Jaxon
25 26
         {
26 27
             throw new \Siak\Tontine\Exception\AuthenticationException();
27 28
         }
29
+        }
28 30
 
29 31
         throw new AuthenticationException(
30 32
             'Unauthenticated.', $guards, $this->redirectTo($request)
Please login to merge, or discard this patch.
app/Ajax/Web/Tontine/Charge.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,13 +196,17 @@
 block discarded – undo
196 196
             $this->response;
197 197
         }
198 198
         // Set the missing field in each item of the charge array.
199
-        if($group === self::GROUP_FIXED) // Fixed charge
199
+        if($group === self::GROUP_FIXED) {
200
+            // Fixed charge
200 201
         {
201 202
             $formValues['type'] = ChargeModel::TYPE_FEE;
202 203
         }
203
-        if($group === self::GROUP_VARIABLE) // Variable charge
204
+        }
205
+        if($group === self::GROUP_VARIABLE) {
206
+            // Variable charge
204 207
         {
205 208
             $formValues['period'] = ChargeModel::PERIOD_NONE;
209
+        }
206 210
             if(empty($formValues['fixed']))
207 211
             {
208 212
                 $formValues['amount'] = 0;
Please login to merge, or discard this patch.
src/Service/Meeting/Cash/DisbursementService.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -230,8 +230,7 @@  discard block
 block discarded – undo
230 230
         {
231 231
             $disbursement->charge_lendable = $charge->lendable;
232 232
             $disbursement->charge()->associate($charge);
233
-        }
234
-        else
233
+        } else
235 234
         {
236 235
             $disbursement->charge_lendable = true;
237 236
         }
@@ -269,8 +268,7 @@  discard block
 block discarded – undo
269 268
         if(($member))
270 269
         {
271 270
             $disbursement->member()->associate($member);
272
-        }
273
-        else
271
+        } else
274 272
         {
275 273
             $disbursement->member()->dissociate();
276 274
         }
@@ -278,8 +276,7 @@  discard block
 block discarded – undo
278 276
         {
279 277
             $disbursement->charge_lendable = $charge->lendable;
280 278
             $disbursement->charge()->associate($charge);
281
-        }
282
-        else
279
+        } else
283 280
         {
284 281
             $disbursement->charge_lendable = true;
285 282
             $disbursement->charge()->dissociate();
Please login to merge, or discard this patch.
src/Service/Report/LocalPdfGenerator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
             $pdf = $page->pdf($this->config);
41 41
 
42 42
             return $pdf->getBase64();
43
-        }
44
-        finally
43
+        } finally
45 44
         {
46 45
             $this->browser->close();
47 46
         }
Please login to merge, or discard this patch.
src/Service/Planning/SessionService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,8 +170,7 @@
 block discarded – undo
170 170
         try
171 171
         {
172 172
             $session->delete();
173
-        }
174
-        catch(Exception $e)
173
+        } catch(Exception $e)
175 174
         {
176 175
             throw new MessageException(trans('tontine.session.errors.delete'));
177 176
         }
Please login to merge, or discard this patch.
src/Service/Planning/PoolService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,7 @@
 block discarded – undo
137 137
             DB::table('pool_session_disabled')->where('pool_id', $pool->id)->delete();
138 138
             // Delete the pool
139 139
             $pool->delete();
140
-        }
141
-        catch(Exception $e)
140
+        } catch(Exception $e)
142 141
         {
143 142
             throw new MessageException(trans('tontine.errors.action') .
144 143
                 '<br/>' . trans('tontine.pool.errors.subscription'));
Please login to merge, or discard this patch.
src/Service/Planning/SummaryService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
         if($pool->remit_auction)
98 98
         {
99 99
             $subscriptions = collect([]);
100
-        }
101
-        else
100
+        } else
102 101
         {
103 102
             $subscriptions = $subscriptions->pluck('member.name', 'id')->sort();
104 103
             $subscriptions->prepend('', 0);
Please login to merge, or discard this patch.