Completed
Branch develop (b6db7c)
by Greg
09:30
created
app/Census/CensusColumnChildrenBornAlive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,6 +53,6 @@
 block discarded – undo
53 53
             }
54 54
         }
55 55
 
56
-        return (string)$count;
56
+        return (string) $count;
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
app/Http/Controllers/AdminUsersController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
             // $datum[4] is the email address
232 232
             if ($user_id != $user->getUserId()) {
233 233
                 $datum[4] = '<a href="' . e(route('message', ['to'  => $datum[2],
234
-                                                              'url' => route('admin-users'),
234
+                                                                'url' => route('admin-users'),
235 235
                     ])) . '">' . e($datum[4]) . '</a>';
236 236
             }
237 237
             // The username
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function cleanup(Request $request): Response
52 52
     {
53
-        $months = (int)$request->get('months', 6);
53
+        $months = (int) $request->get('months', 6);
54 54
 
55 55
         $inactive_threshold   = time() - $months * 30 * self::SECONDS_PER_DAY;
56 56
         $unverified_threshold = time() - 7 * self::SECONDS_PER_DAY;
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 
60 60
         $inactive_users = array_filter($users, function (User $user) use ($inactive_threshold) {
61 61
             if ($user->getPreference('sessiontime') === '0') {
62
-                $datelogin = (int)$user->getPreference('reg_timestamp');
62
+                $datelogin = (int) $user->getPreference('reg_timestamp');
63 63
             } else {
64
-                $datelogin = (int)$user->getPreference('sessiontime');
64
+                $datelogin = (int) $user->getPreference('sessiontime');
65 65
             }
66 66
 
67 67
             return $datelogin < $inactive_threshold && $user->getPreference('verified');
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
         $unverified_users = array_filter($users, function (User $user) use ($unverified_threshold) {
71 71
             if ($user->getPreference('sessiontime') === '0') {
72
-                $datelogin = (int)$user->getPreference('reg_timestamp');
72
+                $datelogin = (int) $user->getPreference('reg_timestamp');
73 73
             } else {
74
-                $datelogin = (int)$user->getPreference('sessiontime');
74
+                $datelogin = (int) $user->getPreference('sessiontime');
75 75
             }
76 76
 
77 77
             return $datelogin < $unverified_threshold && !$user->getPreference('verified');
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function cleanupAction(Request $request): RedirectResponse
99 99
     {
100 100
         foreach (User::all() as $user) {
101
-            if ((bool)$request->get('del_' . $user->getUserId())) {
101
+            if ((bool) $request->get('del_' . $user->getUserId())) {
102 102
                 Log::addAuthenticationLog('Deleted user: ' . $user->getUserName());
103 103
                 $user->delete();
104 104
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $all_users = User::all();
125 125
 
126
-        $page_size = (int)$user->getPreference(' admin_users_page_size', 10);
126
+        $page_size = (int) $user->getPreference(' admin_users_page_size', 10);
127 127
 
128 128
         $title = I18N::translate('User administration');
129 129
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     public function data(Request $request, User $user): JsonResponse
146 146
     {
147 147
         $search = $request->get('search')['value'];
148
-        $start  = (int)$request->get('start');
149
-        $length = (int)$request->get('length');
148
+        $start  = (int) $request->get('start');
149
+        $length = (int) $request->get('length');
150 150
         $order  = $request->get('order', []);
151
-        $draw   = (int)$request->get('draw');
151
+        $draw   = (int) $request->get('draw');
152 152
 
153 153
         $sql_select =
154 154
             "SELECT SQL_CALC_FOUND_ROWS '', u.user_id, user_name, real_name, email, us1.setting_value, us2.setting_value, NULL, us3.setting_value, NULL, us4.setting_value, us5.setting_value" .
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $args = [];
164 164
 
165 165
         if ($search) {
166
-            $sql_select       .= " AND (user_name LIKE CONCAT('%', :search_1, '%') OR real_name LIKE CONCAT('%', :search_2, '%') OR email LIKE CONCAT('%', :search_3, '%'))";
166
+            $sql_select .= " AND (user_name LIKE CONCAT('%', :search_1, '%') OR real_name LIKE CONCAT('%', :search_2, '%') OR email LIKE CONCAT('%', :search_3, '%'))";
167 167
             $args['search_1'] = $search;
168 168
             $args['search_2'] = $search;
169 169
             $args['search_3'] = $search;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         if ($length) {
194 194
             $user->setPreference('admin_users_page_size', $length);
195
-            $sql_select     .= " LIMIT :limit OFFSET :offset";
195
+            $sql_select .= " LIMIT :limit OFFSET :offset";
196 196
             $args['limit']  = $length;
197 197
             $args['offset'] = $start;
198 198
         }
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
         $data = Database::prepare($sql_select)->execute($args)->fetchAll(PDO::FETCH_NUM);
202 202
 
203 203
         // Total filtered/unfiltered rows
204
-        $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
205
-        $recordsTotal    = (int)Database::prepare("SELECT COUNT(*) FROM `##user` WHERE user_id > 0")->fetchOne();
204
+        $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
205
+        $recordsTotal    = (int) Database::prepare("SELECT COUNT(*) FROM `##user` WHERE user_id > 0")->fetchOne();
206 206
 
207 207
         $installed_languages = [];
208 208
         foreach (I18N::installedLocales() as $installed_locale) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function edit(Request $request): Response
291 291
     {
292
-        $user_id = (int)$request->get('user_id');
292
+        $user_id = (int) $request->get('user_id');
293 293
         $user    = User::find($user_id);
294 294
 
295 295
         if ($user === null) {
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function update(Request $request, User $user): RedirectResponse
374 374
     {
375
-        $user_id        = (int)$request->get('user_id');
375
+        $user_id        = (int) $request->get('user_id');
376 376
         $username       = $request->get('username');
377 377
         $real_name      = $request->get('real_name');
378 378
         $email          = $request->get('email');
@@ -382,11 +382,11 @@  discard block
 block discarded – undo
382 382
         $timezone       = $request->get('timezone');
383 383
         $contact_method = $request->get('contact_method');
384 384
         $comment        = $request->get('comment');
385
-        $auto_accept    = (bool)$request->get('auto_accept');
386
-        $canadmin       = (bool)$request->get('canadmin');
387
-        $visible_online = (bool)$request->get('visible_online');
388
-        $verified       = (bool)$request->get('verified');
389
-        $approved       = (bool)$request->get('approved');
385
+        $auto_accept    = (bool) $request->get('auto_accept');
386
+        $canadmin       = (bool) $request->get('canadmin');
387
+        $visible_online = (bool) $request->get('visible_online');
388
+        $verified       = (bool) $request->get('verified');
389
+        $approved       = (bool) $request->get('approved');
390 390
 
391 391
         $edit_user = User::find($user_id);
392 392
 
@@ -404,10 +404,10 @@  discard block
 block discarded – undo
404 404
             ->setPreference('TIMEZONE', $timezone)
405 405
             ->setPreference('contactmethod', $contact_method)
406 406
             ->setPreference('comment', $comment)
407
-            ->setPreference('auto_accept', (string)$auto_accept)
408
-            ->setPreference('visibleonline', (string)$visible_online)
409
-            ->setPreference('verified', (string)$verified)
410
-            ->setPreference('verified_by_admin', (string)$approved);
407
+            ->setPreference('auto_accept', (string) $auto_accept)
408
+            ->setPreference('visibleonline', (string) $visible_online)
409
+            ->setPreference('verified', (string) $verified)
410
+            ->setPreference('verified_by_admin', (string) $approved);
411 411
 
412 412
         // We cannot change our own admin status. Another admin will need to do it.
413 413
         if ($edit_user->getUserId() !== $user->getUserId()) {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         }
416 416
 
417 417
         foreach (Tree::getAll() as $tree) {
418
-            $path_length = (int)$request->get('RELATIONSHIP_PATH_LENGTH' . $tree->getTreeId());
418
+            $path_length = (int) $request->get('RELATIONSHIP_PATH_LENGTH' . $tree->getTreeId());
419 419
             $gedcom_id   = $request->get('gedcomid' . $tree->getTreeId());
420 420
             $can_edit    = $request->get('canedit' . $tree->getTreeId());
421 421
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
             $tree->setUserPreference($edit_user, 'gedcomid', $gedcom_id);
428 428
             $tree->setUserPreference($edit_user, 'canedit', $can_edit);
429
-            $tree->setUserPreference($edit_user, 'RELATIONSHIP_PATH_LENGTH', (string)$path_length);
429
+            $tree->setUserPreference($edit_user, 'RELATIONSHIP_PATH_LENGTH', (string) $path_length);
430 430
         }
431 431
 
432 432
         $url = route('admin-users');
Please login to merge, or discard this patch.
app/Http/Controllers/DescendantsChartController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
         foreach ($person->getChildFamilies() as $cfamily) {
188 188
             foreach ($cfamily->getSpouses() as $parent) {
189 189
                 echo FontAwesome::linkIcon('arrow-up', I18N::translate('Start at parents'), ['href' => route('descendants', ['ged'         => $parent->getTree()->getName(),
190
-                                                                                                                             'xref'        => $parent->getXref(),
191
-                                                                                                                             'generations' => $generations,
190
+                                                                                                                                'xref'        => $parent->getXref(),
191
+                                                                                                                                'generations' => $generations,
192 192
                 ]),
193 193
                 ]);
194 194
                 // only show the arrow for one of the parents
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
             foreach ($spouse->getChildFamilies() as $cfamily) {
269 269
                 foreach ($cfamily->getSpouses() as $parent) {
270 270
                     echo FontAwesome::linkIcon('arrow-up', I18N::translate('Start at parents'), ['href' => route('descendants', ['ged'         => $parent->getTree()->getName(),
271
-                                                                                                                                 'xref'        => $parent->getXref(),
272
-                                                                                                                                 'generations' => $generations,
271
+                                                                                                                                    'xref'        => $parent->getXref(),
272
+                                                                                                                                    'generations' => $generations,
273 273
                     ]),
274 274
                     ]);
275 275
                     // only show the arrow for one of the parents
Please login to merge, or discard this patch.
app/Module/MissingFactsReportModule.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         return new Menu(
66 66
             $this->getTitle(),
67 67
             route('report-setup', ['ged'    => $tree->getName(),
68
-                                   'report' => $this->getName(),
68
+                                    'report' => $this->getName(),
69 69
             ]),
70 70
             'menu-report-' . $this->getName(),
71 71
             ['rel' => 'nofollow']
Please login to merge, or discard this patch.
app/Module/FamilyBookChartModule.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         return new Menu(
72 72
             $this->getTitle(),
73 73
             route('family-book', ['ged'  => $individual->getTree()->getName(),
74
-                                  'xref' => $individual->getXref(),
74
+                                    'xref' => $individual->getXref(),
75 75
             ]),
76 76
             'menu-chart-familybook',
77 77
             ['rel' => 'nofollow']
Please login to merge, or discard this patch.
app/Module/DescendancyChartModule.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         return new Menu(
72 72
             $this->getTitle(),
73 73
             route('descendants', ['ged'  => $individual->getTree()->getName(),
74
-                                  'xref' => $individual->getXref(),
74
+                                    'xref' => $individual->getXref(),
75 75
             ]),
76 76
             'menu-chart-descendants',
77 77
             ['rel' => 'nofollow']
Please login to merge, or discard this patch.
app/MediaFile.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,10 +224,10 @@
 block discarded – undo
224 224
             $src    = $this->imageUrl($width, $height, $fit);
225 225
             $srcset = [];
226 226
             foreach ([
227
-                         2,
228
-                         3,
229
-                         4,
230
-                     ] as $x) {
227
+                            2,
228
+                            3,
229
+                            4,
230
+                        ] as $x) {
231 231
                 $srcset[] = $this->imageUrl($width * $x, $height * $x, $fit) . ' ' . $x . 'x';
232 232
             }
233 233
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -342,7 +342,7 @@
 block discarded – undo
342 342
     public function fileSizeKB()
343 343
     {
344 344
         $size = $this->fileSizeBytes();
345
-        $size = (int)(($size + 1023) / 1024);
345
+        $size = (int) (($size + 1023) / 1024);
346 346
 
347 347
         return /* I18N: size of file in KB */
348 348
             I18N::translate('%s KB', I18N::number($size));
Please login to merge, or discard this patch.
resources/views/admin/users-edit.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
 			<?= Bootstrap4::select($contact_methods, $user->getPreference('contactmethod'), ['id' => 'contact_method', 'name' => 'contact_method']) ?>
182 182
 			<p class="small text-muted">
183 183
 				<?= /* I18N: Help text for the “Preferred contact method” configuration setting */
184
-				I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?>
184
+                I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?>
185 185
 			</p>
186 186
 		</div>
187 187
 	</div>
Please login to merge, or discard this patch.
resources/views/admin/trees-places.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	</dl>
29 29
 
30 30
 	<button class="btn btn-primary" type="submit" value="preview"><?= /* I18N: A button label. */
31
-		I18N::translate('preview') ?></button>
31
+        I18N::translate('preview') ?></button>
32 32
 </form>
33 33
 
34 34
 <?php if ($search && $replace): ?>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		<form method="post" action="<?= e(route('admin-trees-places', ['ged' => $tree->getName(), 'search' => $search, 'replace' => $replace])) ?>">
53 53
 			<?= csrf_field() ?>
54 54
 			<button class="btn btn-primary" type="submit" value="update" name="confirm"><?= /* I18N: A button label. */
55
-				I18N::translate('update') ?></button>
55
+                I18N::translate('update') ?></button>
56 56
 		</form>
57 57
 	<?php endif ?>
58 58
 <?php endif ?>
Please login to merge, or discard this patch.