Passed
Pull Request — main (#51)
by Thierry
13:39
created
app/Ajax/Web/Tontine/Round.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             'title' => trans('common.actions.cancel'),
104 104
             'class' => 'btn btn-tertiary',
105 105
             'click' => 'close',
106
-        ],[
106
+        ], [
107 107
             'title' => trans('common.actions.save'),
108 108
             'class' => 'btn btn-primary',
109 109
             'click' => $this->rq()->create(pm()->form('round-form')),
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             'title' => trans('common.actions.cancel'),
135 135
             'class' => 'btn btn-tertiary',
136 136
             'click' => 'close',
137
-        ],[
137
+        ], [
138 138
             'title' => trans('common.actions.save'),
139 139
             'class' => 'btn btn-primary',
140 140
             'click' => $this->rq()->update($round->id, pm()->form('round-form')),
Please login to merge, or discard this patch.
app/Ajax/Web/Tontine/Tontine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
         $this->response->html('section-title', trans('tontine.menus.tontines'));
62 62
         $this->response->html('content-home', $this->view()->render('tontine.pages.tontine.home'));
63 63
 
64
-        if(($tontine = $this->tenantService->tontine()))
64
+        if (($tontine = $this->tenantService->tontine()))
65 65
         {
66 66
             $this->selectTontine($tontine);
67 67
         }
68
-        if(($round = $this->tenantService->round()))
68
+        if (($round = $this->tenantService->round()))
69 69
         {
70 70
             $this->selectRound($round);
71 71
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             'title' => trans('common.actions.cancel'),
117 117
             'class' => 'btn btn-tertiary',
118 118
             'click' => 'close',
119
-        ],[
119
+        ], [
120 120
             'title' => trans('common.actions.save'),
121 121
             'class' => 'btn btn-primary',
122 122
             'click' => $this->rq()->create(pm()->form('tontine-form')),
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             'title' => trans('common.actions.cancel'),
163 163
             'class' => 'btn btn-tertiary',
164 164
             'click' => 'close',
165
-        ],[
165
+        ], [
166 166
             'title' => trans('common.actions.save'),
167 167
             'class' => 'btn btn-primary',
168 168
             'click' => $this->rq()->update($tontine->id, pm()->form('tontine-form')),
Please login to merge, or discard this patch.
app/Ajax/Web/Tontine/Select.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             'title' => trans('common.actions.close'),
38 38
             'class' => 'btn btn-tertiary',
39 39
             'click' => 'close',
40
-        ],[
40
+        ], [
41 41
             'title' => trans('common.actions.save'),
42 42
             'class' => 'btn btn-primary',
43 43
             'click' => $this->rq()->saveTontine(pm()->select('tontine_id')->toInt()),
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function saveTontine(int $tontineId)
51 51
     {
52
-        if(!($tontine = $this->tontineService->getTontine($tontineId)))
52
+        if (!($tontine = $this->tontineService->getTontine($tontineId)))
53 53
         {
54 54
             return $this->response;
55 55
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $this->selectTontine($tontine);
61 61
 
62
-        if($tontine->rounds->count() === 0)
62
+        if ($tontine->rounds->count() === 0)
63 63
         {
64 64
             $this->dialog->hide();
65 65
             $this->notify->info(trans('tontine.messages.selected', ['tontine' => $tontine->name]));
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function showRounds()
74 74
     {
75
-        if(!($tontine = $this->tenantService->tontine()))
75
+        if (!($tontine = $this->tenantService->tontine()))
76 76
         {
77 77
             return $this->response;
78 78
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             'title' => trans('common.actions.close'),
84 84
             'class' => 'btn btn-tertiary',
85 85
             'click' => 'close',
86
-        ],[
86
+        ], [
87 87
             'title' => trans('common.actions.save'),
88 88
             'class' => 'btn btn-primary',
89 89
             'click' => $this->rq()->saveRound(pm()->select('round_id')->toInt()),
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function saveRound(int $roundId)
97 97
     {
98
-        if(!($tontine = $this->tenantService->tontine()))
98
+        if (!($tontine = $this->tenantService->tontine()))
99 99
         {
100 100
             return $this->response;
101 101
         }
102
-        if(!($round = $this->tontineService->getRound($roundId)))
102
+        if (!($round = $this->tontineService->getRound($roundId)))
103 103
         {
104 104
             return $this->response;
105 105
         }
Please login to merge, or discard this patch.
app/Ajax/Web/Tontine/Member.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             'title' => trans('common.actions.cancel'),
80 80
             'class' => 'btn btn-tertiary',
81 81
             'click' => 'close',
82
-        ],[
82
+        ], [
83 83
             'title' => trans('common.actions.save'),
84 84
             'class' => 'btn btn-primary',
85 85
             'click' => $this->rq()->create(pm()->form('member-form')),
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             'click' => 'close',
113 113
         ]];
114 114
         $useFaker = config('jaxon.app.faker', false);
115
-        if($useFaker)
115
+        if ($useFaker)
116 116
         {
117 117
             $buttons[] = [
118 118
                 'title' => '<i class="fa fa-fill"></i>',
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $members = array_map(function($value) {
141 141
             $values = explode(";", trim($value, " \t\n\r;"));
142
-            if(count($values) === 0 || trim($values[0]) === '')
142
+            if (count($values) === 0 || trim($values[0]) === '')
143 143
             {
144 144
                 return [];
145 145
             }
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
                 'phone' => '',
150 150
             ];
151 151
             // The next values are either the phone number or the email, in any order.
152
-            foreach([1, 2] as $count)
152
+            foreach ([1, 2] as $count)
153 153
             {
154
-                if(count($values) > $count)
154
+                if (count($values) > $count)
155 155
                 {
156 156
                     $field = strpos($values[$count], '@') !== false ? 'email' : 'phone';
157 157
                     $member[$field] = trim($values[$count]);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             'title' => trans('common.actions.cancel'),
194 194
             'class' => 'btn btn-tertiary',
195 195
             'click' => 'close',
196
-        ],[
196
+        ], [
197 197
             'title' => trans('common.actions.save'),
198 198
             'class' => 'btn btn-primary',
199 199
             'click' => $this->rq()->update($member->id, pm()->form('member-form')),
Please login to merge, or discard this patch.
app/Ajax/Web/Locale.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
     public function selectCurrencies(string $countryCode)
17 17
     {
18
-        $html= $this->view()->render('tontine.pages.tontine.currency', [
18
+        $html = $this->view()->render('tontine.pages.tontine.currency', [
19 19
             'currencies' => $this->localeService->getCountryCurrencies($countryCode)
20 20
         ]);
21 21
         $this->response->html('select_currency_container', $html);
Please login to merge, or discard this patch.
app/Ajax/Web/Meeting/Pool/Auction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function show(SessionModel $session)
68 68
     {
69
-        if(!$this->tontineService->hasPoolWithAuction())
69
+        if (!$this->tontineService->hasPoolWithAuction())
70 70
         {
71 71
             return $this->response;
72 72
         }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function togglePayment(string $auctionId)
130 130
     {
131
-        if($this->session->closed)
131
+        if ($this->session->closed)
132 132
         {
133 133
             $this->notify->warning(trans('meeting.warnings.session.closed'));
134 134
             return $this->response;
Please login to merge, or discard this patch.
app/Ajax/Web/Meeting/Pool/Remitment/Pool.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $this->target()->args()[0] : $this->bag('meeting')->get('pool.id');
79 79
         $this->pool = $this->remitmentService->getPool($poolId);
80 80
 
81
-        if(!$this->session || !$this->pool || $this->session->disabled($this->pool))
81
+        if (!$this->session || !$this->pool || $this->session->disabled($this->pool))
82 82
         {
83 83
             $this->notify->error(trans('tontine.session.errors.disabled'), trans('common.titles.error'));
84 84
             $this->pool = null;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         ]);
99 99
         $this->response->html('meeting-remitments', $html);
100 100
 
101
-        if(!$this->pool->remit_planned)
101
+        if (!$this->pool->remit_planned)
102 102
         {
103 103
             $this->jq('#btn-new-remitment')->click($this->rq()->addRemitment(0));
104 104
         }
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 
127 127
     public function createRemitment(int $payableId)
128 128
     {
129
-        if($this->session->closed)
129
+        if ($this->session->closed)
130 130
         {
131 131
             $this->notify->warning(trans('meeting.warnings.session.closed'));
132 132
             return $this->response;
133 133
         }
134
-        if(!$this->pool->remit_planned || $this->pool->remit_auction)
134
+        if (!$this->pool->remit_planned || $this->pool->remit_auction)
135 135
         {
136 136
             // Only when remitments are planned and without auctions.
137 137
             return $this->response;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
     public function addRemitment(int $payableId)
150 150
     {
151
-        if($this->session->closed)
151
+        if ($this->session->closed)
152 152
         {
153 153
             $this->notify->warning(trans('meeting.warnings.session.closed'));
154 154
             return $this->response;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             'title' => trans('common.actions.cancel'),
170 170
             'class' => 'btn btn-tertiary',
171 171
             'click' => 'close',
172
-        ],[
172
+        ], [
173 173
             'title' => trans('common.actions.save'),
174 174
             'class' => 'btn btn-primary',
175 175
             'click' => $this->rq()->saveRemitment(pm()->form('remitment-form')),
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public function saveRemitment(array $formValues)
186 186
     {
187
-        if($this->session->closed)
187
+        if ($this->session->closed)
188 188
         {
189 189
             $this->notify->warning(trans('meeting.warnings.session.closed'));
190 190
             $this->dialog->hide();
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $this->dialog->hide();
208 208
 
209 209
         // Refresh the auction page
210
-        if($this->pool->remit_auction)
210
+        if ($this->pool->remit_auction)
211 211
         {
212 212
             $this->cl(Auction::class)->show($this->session);
213 213
         }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function deleteRemitment(int $payableId)
225 225
     {
226
-        if($this->session->closed)
226
+        if ($this->session->closed)
227 227
         {
228 228
             $this->notify->warning(trans('meeting.warnings.session.closed'));
229 229
             return $this->response;
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $this->remitmentService->deleteRemitment($this->pool, $this->session, $payableId);
233 233
 
234 234
         // Refresh the auction page
235
-        if($this->pool->remit_auction)
235
+        if ($this->pool->remit_auction)
236 236
         {
237 237
             $this->cl(Auction::class)->show($this->session);
238 238
         }
Please login to merge, or discard this patch.
app/Ajax/Web/Meeting/Credit/Refund.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function createRefund(string $debtId)
117 117
     {
118
-        if($this->session->closed)
118
+        if ($this->session->closed)
119 119
         {
120 120
             $this->notify->warning(trans('meeting.warnings.session.closed'));
121 121
             return $this->response;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     public function deleteRefund(int $debtId)
135 135
     {
136
-        if($this->session->closed)
136
+        if ($this->session->closed)
137 137
         {
138 138
             $this->notify->warning(trans('meeting.warnings.session.closed'));
139 139
             return $this->response;
Please login to merge, or discard this patch.
app/Ajax/Web/Meeting/Credit/Loan.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function addLoan()
97 97
     {
98
-        if($this->session->closed)
98
+        if ($this->session->closed)
99 99
         {
100 100
             $this->notify->warning(trans('meeting.warnings.session.closed'));
101 101
             return $this->response;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             'title' => trans('common.actions.cancel'),
113 113
             'class' => 'btn btn-tertiary',
114 114
             'click' => 'close',
115
-        ],[
115
+        ], [
116 116
             'title' => trans('common.actions.save'),
117 117
             'class' => 'btn btn-primary',
118 118
             'click' => $this->rq()->createLoan(pm()->form('loan-form')),
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function createLoan(array $formValues)
130 130
     {
131
-        if($this->session->closed)
131
+        if ($this->session->closed)
132 132
         {
133 133
             $this->notify->warning(trans('meeting.warnings.session.closed'));
134 134
             return $this->response;
@@ -149,19 +149,19 @@  discard block
 block discarded – undo
149 149
 
150 150
     public function editLoan(int $loanId)
151 151
     {
152
-        if($this->session->closed)
152
+        if ($this->session->closed)
153 153
         {
154 154
             $this->notify->warning(trans('meeting.warnings.session.closed'));
155 155
             return $this->response;
156 156
         }
157 157
         $loan = $this->loanService->getSessionLoan($this->session, $loanId);
158
-        if(!$loan)
158
+        if (!$loan)
159 159
         {
160 160
             $this->notify->warning(trans('meeting.loan.errors.not_found'));
161 161
             return $this->response;
162 162
         }
163 163
         // A refunded loan, or that was created from a remitment cannot be updated.
164
-        if($loan->refunds_count > 0 || $loan->remitment_id)
164
+        if ($loan->refunds_count > 0 || $loan->remitment_id)
165 165
         {
166 166
             $this->notify->warning(trans('meeting.loan.errors.update'));
167 167
             return $this->response;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             'title' => trans('common.actions.cancel'),
176 176
             'class' => 'btn btn-tertiary',
177 177
             'click' => 'close',
178
-        ],[
178
+        ], [
179 179
             'title' => trans('common.actions.save'),
180 180
             'class' => 'btn btn-primary',
181 181
             'click' => $this->rq()->updateLoan($loanId, pm()->form('loan-form')),
@@ -191,19 +191,19 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function updateLoan(int $loanId, array $formValues)
193 193
     {
194
-        if($this->session->closed)
194
+        if ($this->session->closed)
195 195
         {
196 196
             $this->notify->warning(trans('meeting.warnings.session.closed'));
197 197
             return $this->response;
198 198
         }
199 199
         $loan = $this->loanService->getSessionLoan($this->session, $loanId);
200
-        if(!$loan)
200
+        if (!$loan)
201 201
         {
202 202
             $this->notify->warning(trans('meeting.loan.errors.not_found'));
203 203
             return $this->response;
204 204
         }
205 205
         // A refunded loan, or that was created from a remitment cannot be updated.
206
-        if($loan->refunds_count > 0 || $loan->remitment_id)
206
+        if ($loan->refunds_count > 0 || $loan->remitment_id)
207 207
         {
208 208
             $this->notify->warning(trans('meeting.loan.errors.update'));
209 209
             return $this->response;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
     public function deleteLoan(int $loanId)
225 225
     {
226
-        if($this->session->closed)
226
+        if ($this->session->closed)
227 227
         {
228 228
             $this->notify->warning(trans('meeting.warnings.session.closed'));
229 229
             return $this->response;
Please login to merge, or discard this patch.