Passed
Pull Request — main (#54)
by Thierry
13:54
created
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/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/PartialRefund.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function addRefund()
108 108
     {
109
-        if($this->session->closed)
109
+        if ($this->session->closed)
110 110
         {
111 111
             $this->notify->warning(trans('meeting.warnings.session.closed'));
112 112
             return $this->response;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             'title' => trans('common.actions.cancel'),
120 120
             'class' => 'btn btn-tertiary',
121 121
             'click' => 'close',
122
-        ],[
122
+        ], [
123 123
             'title' => trans('common.actions.save'),
124 124
             'class' => 'btn btn-primary',
125 125
             'click' => $this->rq()->createRefund(pm()->form('refund-form')),
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function createRefund(array $formValues)
136 136
     {
137
-        if($this->session->closed)
137
+        if ($this->session->closed)
138 138
         {
139 139
             $this->notify->warning(trans('meeting.warnings.session.closed'));
140 140
             return $this->response;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     public function deleteRefund(int $refundId)
160 160
     {
161
-        if($this->session->closed)
161
+        if ($this->session->closed)
162 162
         {
163 163
             $this->notify->warning(trans('meeting.warnings.session.closed'));
164 164
             return $this->response;
Please login to merge, or discard this patch.
app/Ajax/Web/Meeting/Cash/Disbursement.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function addDisbursement()
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;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             'title' => trans('common.actions.cancel'),
111 111
             'class' => 'btn btn-tertiary',
112 112
             'click' => 'close',
113
-        ],[
113
+        ], [
114 114
             'title' => trans('common.actions.save'),
115 115
             'class' => 'btn btn-primary',
116 116
             'click' => $this->rq()->createDisbursement(pm()->form('disbursement-form')),
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function createDisbursement(array $formValues)
127 127
     {
128
-        if($this->session->closed)
128
+        if ($this->session->closed)
129 129
         {
130 130
             $this->notify->warning(trans('meeting.warnings.session.closed'));
131 131
             return $this->response;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     public function editDisbursement(int $disbursementId)
146 146
     {
147
-        if($this->session->closed)
147
+        if ($this->session->closed)
148 148
         {
149 149
             $this->notify->warning(trans('meeting.warnings.session.closed'));
150 150
             return $this->response;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             'title' => trans('common.actions.cancel'),
162 162
             'class' => 'btn btn-tertiary',
163 163
             'click' => 'close',
164
-        ],[
164
+        ], [
165 165
             'title' => trans('common.actions.save'),
166 166
             'class' => 'btn btn-primary',
167 167
             'click' => $this->rq()->updateDisbursement($disbursementId, pm()->form('disbursement-form')),
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function updateDisbursement(int $disbursementId, array $formValues)
178 178
     {
179
-        if($this->session->closed)
179
+        if ($this->session->closed)
180 180
         {
181 181
             $this->notify->warning(trans('meeting.warnings.session.closed'));
182 182
             return $this->response;
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
     public function deleteDisbursement(int $disbursementId)
197 197
     {
198
-        if($this->session->closed)
198
+        if ($this->session->closed)
199 199
         {
200 200
             $this->notify->warning(trans('meeting.warnings.session.closed'));
201 201
             return $this->response;
Please login to merge, or discard this patch.
app/Ajax/Web/Planning/Subscription/Session.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function getPool()
51 51
     {
52
-        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] :
53
-            intval($this->bag('subscription')->get('pool.id'));
52
+        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : intval($this->bag('subscription')->get('pool.id'));
54 53
         $this->pool = $this->poolService->getPool($poolId);
55 54
     }
56 55
 
@@ -69,7 +68,7 @@  discard block
 block discarded – undo
69 68
             ->with('pool', $this->pool);
70 69
         $this->response->html('pool-subscription-sessions', $html);
71 70
         $this->jq('#btn-subscription-sessions-refresh')->click($this->rq()->home($poolId));
72
-        if($this->pool->remit_planned)
71
+        if ($this->pool->remit_planned)
73 72
         {
74 73
             $this->jq('#btn-subscription-planning')
75 74
                 ->click($this->cl(Subscription::class)->rq()->planning($poolId));
Please login to merge, or discard this patch.
app/Ajax/Web/Planning/Subscription/Member.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function getPool()
52 52
     {
53
-        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] :
54
-            intval($this->bag('subscription')->get('pool.id'));
53
+        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : intval($this->bag('subscription')->get('pool.id'));
55 54
         $this->pool = $this->poolService->getPool($poolId);
56 55
     }
57 56
 
@@ -71,7 +70,7 @@  discard block
 block discarded – undo
71 70
         $this->response->html('pool-subscription-members', $html);
72 71
         $this->jq('#btn-subscription-members-filter')->click($this->rq()->filter());
73 72
         $this->jq('#btn-subscription-members-refresh')->click($this->rq()->home($poolId));
74
-        if($this->pool->remit_planned)
73
+        if ($this->pool->remit_planned)
75 74
         {
76 75
             $this->jq('#btn-subscription-beneficiaries')
77 76
                 ->click($this->cl(Subscription::class)->rq()->beneficiaries($poolId));
Please login to merge, or discard this patch.
app/Ajax/Web/Faker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $count = intval($this->bag('faker')->get('charge.count'));
52 52
         $charges = $this->chargeService->getFakeCharges($count);
53
-        for($i = 0; $i < $count; $i++)
53
+        for ($i = 0; $i < $count; $i++)
54 54
         {
55 55
             $this->jq("#charge_type_$i")->val($charges[$i]->type);
56 56
             $this->jq("#charge_period_$i")->val($charges[$i]->period);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $count = intval($this->bag('faker')->get('pool.count'));
71 71
         $pools = $this->poolService->getFakePools($count);
72
-        for($i = 0; $i < $count; $i++)
72
+        for ($i = 0; $i < $count; $i++)
73 73
         {
74 74
             $this->jq("#pool_title_$i")->val($pools[$i]->title);
75 75
             $this->jq("#pool_amount_$i")->val($pools[$i]->amount);
Please login to merge, or discard this patch.
src/Service/Tontine/TontineService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
     public function deleteTontine(int $id)
186 186
     {
187 187
         $tontine = $this->tenantService->user()->tontines()->find($id);
188
-        if(!$tontine)
188
+        if (!$tontine)
189 189
         {
190 190
             return;
191 191
         }
Please login to merge, or discard this patch.
src/Service/Tontine/ChargeService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
      */
142 142
     public function deleteCharge(Charge $charge)
143 143
     {
144
-        if($charge->bills_count > 0)
144
+        if ($charge->bills_count > 0)
145 145
         {
146 146
             throw new MessageException(trans('tontine.charge.errors.cannot_delete'));
147 147
         }
Please login to merge, or discard this patch.