| @@ -42,8 +42,7 @@ discard block | ||
| 42 | 42 | */ | 
| 43 | 43 | protected function getPool() | 
| 44 | 44 |      { | 
| 45 | - $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : | |
| 46 | -            intval($this->bag('subscription')->get('pool.id')); | |
| 45 | +        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : intval($this->bag('subscription')->get('pool.id')); | |
| 47 | 46 | $this->pool = $this->poolService->getPool($poolId); | 
| 48 | 47 | } | 
| 49 | 48 | |
| @@ -65,7 +64,7 @@ discard block | ||
| 65 | 64 |          $this->jq('#btn-subscription-members-refresh')->click($this->rq()->home($poolId)); | 
| 66 | 65 |          $this->jq('#btn-subscription-members-search') | 
| 67 | 66 |              ->click($this->rq()->search(jq('#txt-subscription-members-search')->val())); | 
| 68 | - if($this->pool->remit_planned) | |
| 67 | + if ($this->pool->remit_planned) | |
| 69 | 68 |          { | 
| 70 | 69 |              $this->jq('#btn-subscription-beneficiaries') | 
| 71 | 70 | ->click($this->rq(Subscription::class)->beneficiaries($poolId)); | 
| @@ -35,8 +35,7 @@ discard block | ||
| 35 | 35 | */ | 
| 36 | 36 | protected function getPool() | 
| 37 | 37 |      { | 
| 38 | - $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : | |
| 39 | -            intval($this->bag('subscription')->get('pool.id')); | |
| 38 | +        $poolId = $this->target()->method() === 'home' ? $this->target()->args()[0] : intval($this->bag('subscription')->get('pool.id')); | |
| 40 | 39 | $this->pool = $this->poolService->getPool($poolId); | 
| 41 | 40 | } | 
| 42 | 41 | |
| @@ -57,7 +56,7 @@ discard block | ||
| 57 | 56 | ]); | 
| 58 | 57 |          $this->response->html('pool-subscription-sessions', $html); | 
| 59 | 58 |          $this->jq('#btn-subscription-sessions-refresh')->click($this->rq()->home($poolId)); | 
| 60 | - if($this->pool->remit_planned) | |
| 59 | + if ($this->pool->remit_planned) | |
| 61 | 60 |          { | 
| 62 | 61 |              $this->jq('#btn-subscription-planning') | 
| 63 | 62 | ->click($this->rq(Subscription::class)->planning($poolId)); | 
| @@ -71,14 +71,14 @@ discard block | ||
| 71 | 71 |          $this->response->html('section-title', trans('tontine.menus.planning')); | 
| 72 | 72 |          $this->response->html('content-home-sessions', $html); | 
| 73 | 73 | |
| 74 | - if($showScreen) | |
| 74 | + if ($showScreen) | |
| 75 | 75 |          { | 
| 76 | 76 |              $this->response->call('showSmScreen', 'content-home-sessions', 'round-sm-screens'); | 
| 77 | 77 |              $this->jq('#btn-rounds-back')->click(rq('.') | 
| 78 | 78 |                  ->showSmScreen('content-home-rounds', 'round-sm-screens')); | 
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | - if(!$this->round) | |
| 81 | + if (!$this->round) | |
| 82 | 82 |          { | 
| 83 | 83 | // Show an empty sessions table | 
| 84 | 84 |              $html = $this->render('pages.planning.session.page', [ | 
| @@ -129,7 +129,7 @@ discard block | ||
| 129 | 129 |              'title' => trans('common.actions.cancel'), | 
| 130 | 130 | 'class' => 'btn btn-tertiary', | 
| 131 | 131 | 'click' => 'close', | 
| 132 | - ],[ | |
| 132 | + ], [ | |
| 133 | 133 |              'title' => trans('common.actions.save'), | 
| 134 | 134 | 'class' => 'btn btn-primary', | 
| 135 | 135 |              'click' => $this->rq()->create(pm()->form('session-form')), | 
| @@ -160,11 +160,11 @@ discard block | ||
| 160 | 160 |              'title' => trans('common.actions.cancel'), | 
| 161 | 161 | 'class' => 'btn btn-tertiary', | 
| 162 | 162 | 'click' => 'close', | 
| 163 | - ],[ | |
| 163 | + ], [ | |
| 164 | 164 |              'title' => trans('common.actions.year'), | 
| 165 | 165 | 'class' => 'btn btn-primary', | 
| 166 | 166 | 'click' => $this->rq()->years(), | 
| 167 | - ],[ | |
| 167 | + ], [ | |
| 168 | 168 |              'title' => trans('common.actions.save'), | 
| 169 | 169 | 'class' => 'btn btn-primary', | 
| 170 | 170 |              'click' => $this->rq()->createList(pm()->form('session-list')), | 
| @@ -193,12 +193,12 @@ discard block | ||
| 193 | 193 | private function parseSessionList(string $sessions): array | 
| 194 | 194 |      { | 
| 195 | 195 |          $sessions = array_map(function($value) { | 
| 196 | - if(!($value = trim($value, " \t\n\r;"))) | |
| 196 | + if (!($value = trim($value, " \t\n\r;"))) | |
| 197 | 197 |              { | 
| 198 | 198 | return []; | 
| 199 | 199 | } | 
| 200 | 200 |              $values = explode(";", $value); | 
| 201 | - if(count($values) !== 2) | |
| 201 | + if (count($values) !== 2) | |
| 202 | 202 |              { | 
| 203 | 203 | return []; // Todo: throw an exception | 
| 204 | 204 | } | 
| @@ -215,7 +215,7 @@ discard block | ||
| 215 | 215 | |
| 216 | 216 | // Check uniqueness of session dates | 
| 217 | 217 | $sessionDates = array_unique(array_map(fn($session) => $session['date'], $sessions)); | 
| 218 | - if(count($sessions) !== count($sessionDates)) | |
| 218 | + if (count($sessions) !== count($sessionDates)) | |
| 219 | 219 |          { | 
| 220 | 220 |              throw new MessageException(trans('tontine.session.errors.date_dup')); | 
| 221 | 221 | } | 
| @@ -248,7 +248,7 @@ discard block | ||
| 248 | 248 |              'title' => trans('common.actions.cancel'), | 
| 249 | 249 | 'class' => 'btn btn-tertiary', | 
| 250 | 250 | 'click' => 'close', | 
| 251 | - ],[ | |
| 251 | + ], [ | |
| 252 | 252 |              'title' => trans('common.actions.save'), | 
| 253 | 253 | 'class' => 'btn btn-primary', | 
| 254 | 254 |              'click' => $this->rq()->update($session->id, pm()->form('session-form')), | 
| @@ -286,7 +286,7 @@ discard block | ||
| 286 | 286 |              'title' => trans('common.actions.cancel'), | 
| 287 | 287 | 'class' => 'btn btn-tertiary', | 
| 288 | 288 | 'click' => 'close', | 
| 289 | - ],[ | |
| 289 | + ], [ | |
| 290 | 290 |              'title' => trans('common.actions.save'), | 
| 291 | 291 | 'class' => 'btn btn-primary', | 
| 292 | 292 |              'click' => $this->rq()->saveVenue($session->id, pm()->form('session-form')), | 
| @@ -32,7 +32,7 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 | protected function getSession() | 
| 34 | 34 |      { | 
| 35 | - if($this->target()->method() === 'home' || | |
| 35 | + if ($this->target()->method() === 'home' || | |
| 36 | 36 |              ($sessionId = $this->bag('presence')->get('session.id')) === 0) | 
| 37 | 37 |          { | 
| 38 | 38 | return; | 
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 | public function togglePresence(int $memberId) | 
| 144 | 144 |      { | 
| 145 | 145 | $member = $this->memberService->getMember($memberId); | 
| 146 | - if(!$member) | |
| 146 | + if (!$member) | |
| 147 | 147 |          { | 
| 148 | 148 | return $this->response; | 
| 149 | 149 | } | 
| @@ -32,7 +32,7 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 | protected function getMember() | 
| 34 | 34 |      { | 
| 35 | - if($this->target()->method() === 'home' || | |
| 35 | + if ($this->target()->method() === 'home' || | |
| 36 | 36 |              ($memberId = $this->bag('presence')->get('member.id')) === 0) | 
| 37 | 37 |          { | 
| 38 | 38 | return; | 
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | public function togglePresence(int $sessionId) | 
| 118 | 118 |      { | 
| 119 | 119 | $session = $this->sessionService->getSession($sessionId); | 
| 120 | - if(!$session) | |
| 120 | + if (!$session) | |
| 121 | 121 |          { | 
| 122 | 122 | return $this->response; | 
| 123 | 123 | } | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 |      { | 
| 49 | 49 |          $html = $this->render('pages.meeting.saving.home', [ | 
| 50 | 50 | 'session' => $this->session, | 
| 51 | -            'fundId' => (int)$this->bag('meeting.saving')->get('fund.id', -1), | |
| 51 | +            'fundId' => (int) $this->bag('meeting.saving')->get('fund.id', -1), | |
| 52 | 52 |              'funds' => $this->fundService->getFundList()->prepend('', -1), | 
| 53 | 53 | ]); | 
| 54 | 54 |          $this->response->html('meeting-savings', $html); | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | |
| 74 | 74 | public function page(int $pageNumber = 0) | 
| 75 | 75 |      { | 
| 76 | -        $fundId = (int)$this->bag('meeting.saving')->get('fund.id', -1); | |
| 76 | +        $fundId = (int) $this->bag('meeting.saving')->get('fund.id', -1); | |
| 77 | 77 | $savingCount = $this->savingService->getSavingCount($this->session, $fundId); | 
| 78 | 78 | [$pageNumber, $perPage] = $this->pageNumber($pageNumber, $savingCount, | 
| 79 | 79 | 'meeting.saving', 'page'); | 
| @@ -107,7 +107,7 @@ discard block | ||
| 107 | 107 | |
| 108 | 108 | public function editSaving(int $savingId) | 
| 109 | 109 |      { | 
| 110 | - if($this->session->closed) | |
| 110 | + if ($this->session->closed) | |
| 111 | 111 |          { | 
| 112 | 112 |              $this->notify->warning(trans('meeting.warnings.session.closed')); | 
| 113 | 113 | return $this->response; | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 |              'title' => trans('common.actions.cancel'), | 
| 125 | 125 | 'class' => 'btn btn-tertiary', | 
| 126 | 126 | 'click' => 'close', | 
| 127 | - ],[ | |
| 127 | + ], [ | |
| 128 | 128 |              'title' => trans('common.actions.save'), | 
| 129 | 129 | 'class' => 'btn btn-primary', | 
| 130 | 130 |              'click' => $this->rq()->updateSaving($savingId, pm()->form('saving-form')), | 
| @@ -140,7 +140,7 @@ discard block | ||
| 140 | 140 | */ | 
| 141 | 141 | public function updateSaving(int $savingId, array $formValues) | 
| 142 | 142 |      { | 
| 143 | - if($this->session->closed) | |
| 143 | + if ($this->session->closed) | |
| 144 | 144 |          { | 
| 145 | 145 |              $this->notify->warning(trans('meeting.warnings.session.closed')); | 
| 146 | 146 | return $this->response; | 
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | */ | 
| 160 | 160 | public function deleteSaving(int $savingId) | 
| 161 | 161 |      { | 
| 162 | - if($this->session->closed) | |
| 162 | + if ($this->session->closed) | |
| 163 | 163 |          { | 
| 164 | 164 |              $this->notify->warning(trans('meeting.warnings.session.closed')); | 
| 165 | 165 | return $this->response; | 
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 |          $this->response->call('makeTableResponsive', 'payment-members-page'); | 
| 72 | 72 | |
| 73 | 73 | // Don't show the payable items if there is no opened session or no member. | 
| 74 | -        if($this->sessions->count() === 0 || $this->memberService->getMemberCount('') === 0) | |
| 74 | +        if ($this->sessions->count() === 0 || $this->memberService->getMemberCount('') === 0) | |
| 75 | 75 |          { | 
| 76 | 76 | return $this->response; | 
| 77 | 77 | } | 
| @@ -84,15 +84,15 @@ discard block | ||
| 84 | 84 | |
| 85 | 85 | public function payables(int $memberId, int $sessionId) | 
| 86 | 86 |      { | 
| 87 | - if(!($member = $this->memberService->getMember($memberId))) | |
| 87 | + if (!($member = $this->memberService->getMember($memberId))) | |
| 88 | 88 |          { | 
| 89 | 89 | return $this->response; | 
| 90 | 90 | } | 
| 91 | - if(!($session = $this->sessionService->getSession($sessionId))) | |
| 91 | + if (!($session = $this->sessionService->getSession($sessionId))) | |
| 92 | 92 |          { | 
| 93 | 93 | return $this->response; | 
| 94 | 94 | } | 
| 95 | - if(!$session->opened) | |
| 95 | + if (!$session->opened) | |
| 96 | 96 |          { | 
| 97 | 97 | return $this->response; | 
| 98 | 98 | } | 
| @@ -39,7 +39,7 @@ | ||
| 39 | 39 |          $this->response->html('meeting-remitments', $html); | 
| 40 | 40 |          $this->response->call('makeTableResponsive', 'meeting-remitments'); | 
| 41 | 41 | |
| 42 | - if($hasAuctions) | |
| 42 | + if ($hasAuctions) | |
| 43 | 43 |          { | 
| 44 | 44 |              $this->jq('#btn-remitment-auctions')->click($this->rq(Auction::class)->home()); | 
| 45 | 45 | } | 
| @@ -57,7 +57,7 @@ | ||
| 57 | 57 | public function home(int $fundId, bool $backButton = false) | 
| 58 | 58 |      { | 
| 59 | 59 | $funds = $this->fundService->getFundList(); | 
| 60 | - if(!isset($funds[$fundId])) | |
| 60 | + if (!isset($funds[$fundId])) | |
| 61 | 61 |          { | 
| 62 | 62 | return $this->response; | 
| 63 | 63 | } |