Passed
Push — main ( 9cf412...9bfe59 )
by Thierry
05:31
created
app/Exceptions/Handler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function register()
84 84
     {
85
-        $this->reportable(function (Throwable $e) {
85
+        $this->reportable(function(Throwable $e) {
86 86
             //
87 87
         });
88 88
 
89 89
         // Redirect to the login page
90
-        $this->renderable(function (AuthenticationException $e) {
90
+        $this->renderable(function(AuthenticationException $e) {
91 91
             $jaxon = app()->make(Jaxon::class);
92 92
             $ajaxResponse = $jaxon->ajaxResponse();
93 93
             $ajaxResponse->redirect(route('login'));
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         });
97 97
 
98 98
         // Show the error message in a dialog
99
-        $this->renderable(function (MessageException $e) {
99
+        $this->renderable(function(MessageException $e) {
100 100
             $jaxon = app()->make(Jaxon::class);
101 101
             $ajaxResponse = $jaxon->ajaxResponse();
102 102
             $ajaxResponse->dialog->error($e->getMessage(), trans('common.titles.error'));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         });
106 106
 
107 107
         // Show the warning message in a dialog, and show the sessions page.
108
-        $this->renderable(function (PlanningRoundException $e) {
108
+        $this->renderable(function(PlanningRoundException $e) {
109 109
             $this->getCallableObject(Round::class)->home();
110 110
 
111 111
             $jaxon = app()->make(Jaxon::class);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         });
117 117
 
118 118
         // Show the warning message in a dialog, and show the pools page.
119
-        $this->renderable(function (PlanningPoolException $e) {
119
+        $this->renderable(function(PlanningPoolException $e) {
120 120
             $this->getCallableObject(Pool::class)->home();
121 121
 
122 122
             $jaxon = app()->make(Jaxon::class);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         });
128 128
 
129 129
         // Show the warning message in a dialog, and show the members page.
130
-        $this->renderable(function (TontineMemberException $e) {
130
+        $this->renderable(function(TontineMemberException $e) {
131 131
             $this->getCallableObject(Member::class)->home();
132 132
 
133 133
             $jaxon = app()->make(Jaxon::class);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         });
139 139
 
140 140
         // Show the warning message in a dialog, and show the sessions page.
141
-        $this->renderable(function (MeetingRoundException $e) {
141
+        $this->renderable(function(MeetingRoundException $e) {
142 142
             $this->getCallableObject(Session::class)->home();
143 143
 
144 144
             $jaxon = app()->make(Jaxon::class);
Please login to merge, or discard this patch.
app/Ajax/CallableClass.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
         string $bagName, string $attrName = 'page'): array
57 57
     {
58 58
         $perPage = 10;
59
-        $pageCount = (int)floor($itemCount / $perPage) + ($itemCount % $perPage > 0 ? 1 : 0);
60
-        if($pageNumber < 1)
59
+        $pageCount = (int) floor($itemCount / $perPage) + ($itemCount % $perPage > 0 ? 1 : 0);
60
+        if ($pageNumber < 1)
61 61
         {
62 62
             $pageNumber = $this->bag($bagName)->get($attrName, 1);
63 63
         }
64
-        if($pageNumber > $pageCount)
64
+        if ($pageNumber > $pageCount)
65 65
         {
66 66
             $pageNumber = $pageCount;
67 67
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     protected function checkRoundSessions()
152 152
     {
153 153
         $round = $this->tenantService->round();
154
-        if(!$round || $round->sessions->count() === 0)
154
+        if (!$round || $round->sessions->count() === 0)
155 155
         {
156 156
             throw new PlanningRoundException(trans('tontine.errors.checks.sessions'));
157 157
         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         $this->checkRoundSessions();
166 166
 
167 167
         $round = $this->tenantService->round();
168
-        if(!$round || $round->pools->count() === 0)
168
+        if (!$round || $round->pools->count() === 0)
169 169
         {
170 170
             throw new PlanningPoolException(trans('tontine.errors.checks.pools'));
171 171
         }
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
         $this->checkRoundSessions();
181 181
 
182 182
         $tontine = $this->tenantService->tontine();
183
-        if(!$tontine || $tontine->members()->active()->count() === 0)
183
+        if (!$tontine || $tontine->members()->active()->count() === 0)
184 184
         {
185 185
             throw new TontineMemberException(trans('tontine.errors.checks.members'));
186 186
         }
187 187
 
188 188
         $round = $this->tenantService->round();
189
-        if(!$round || $round->sessions->filter(fn($session) =>
189
+        if (!$round || $round->sessions->filter(fn($session) =>
190 190
             ($session->opened || $session->closed))->count() === 0)
191 191
         {
192 192
             throw new MeetingRoundException(trans('tontine.errors.checks.opened_sessions'));
Please login to merge, or discard this patch.