@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $this->localeService->setCurrency($tontine->currency_code); |
| 67 | 67 | // Save as latest tontine id if it has changed. |
| 68 | 68 | $tontineId = $this->user->properties['latest']['tontine'] ?? 0; |
| 69 | - if($tontineId === $tontine->id) |
|
| 69 | + if ($tontineId === $tontine->id) |
|
| 70 | 70 | { |
| 71 | 71 | return; |
| 72 | 72 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $this->round = $round; |
| 86 | 86 | // Save as latest round id if it has changed. |
| 87 | 87 | $roundId = $this->user->properties['latest']['round'] ?? 0; |
| 88 | - if($roundId === $round->id) |
|
| 88 | + if ($roundId === $round->id) |
|
| 89 | 89 | { |
| 90 | 90 | return; |
| 91 | 91 | } |
@@ -152,10 +152,8 @@ discard block |
||
| 152 | 152 | ->orderBy('start_at', $orderAsc ? 'asc' : 'desc') |
| 153 | 153 | ->get(); |
| 154 | 154 | |
| 155 | - return $lastSession === null ? $sessions : |
|
| 156 | - $sessions->filter(function($session) use($lastSession, $withCurrent) { |
|
| 157 | - return $withCurrent ? $session->start_at <= $lastSession->start_at : |
|
| 158 | - $session->start_at < $lastSession->start_at; |
|
| 155 | + return $lastSession === null ? $sessions : $sessions->filter(function($session) use($lastSession, $withCurrent) { |
|
| 156 | + return $withCurrent ? $session->start_at <= $lastSession->start_at : $session->start_at < $lastSession->start_at; |
|
| 159 | 157 | }); |
| 160 | 158 | } |
| 161 | 159 | |
@@ -209,7 +207,7 @@ discard block |
||
| 209 | 207 | public function getPool(int $poolId, bool $with = false): ?Pool |
| 210 | 208 | { |
| 211 | 209 | $pools = $this->round->pools(); |
| 212 | - if($with) |
|
| 210 | + if ($with) |
|
| 213 | 211 | { |
| 214 | 212 | $pools->with(['subscriptions.receivables.deposit']); |
| 215 | 213 | } |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function saveProperties(array $content) |
| 38 | 38 | { |
| 39 | - $this->property ? $this->property->update(['content' => $content]) : |
|
| 40 | - $this->property()->create(['content' => $content]); |
|
| 39 | + $this->property ? $this->property->update(['content' => $content]) : $this->property()->create(['content' => $content]); |
|
| 41 | 40 | // Refresh the relation; |
| 42 | 41 | $this->load('property'); |
| 43 | 42 | } |