Completed
Pull Request — master (#1849)
by Rico
08:11
created
app/Http/Controllers/HomePageController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -840,9 +840,9 @@
 block discarded – undo
840 840
         }
841 841
 
842 842
         foreach ([
843
-             'main' => $main_blocks,
844
-             'side' => $side_blocks,
845
-         ] as $location => $updated_blocks) {
843
+                'main' => $main_blocks,
844
+                'side' => $side_blocks,
845
+            ] as $location => $updated_blocks) {
846 846
             foreach ($updated_blocks as $block_order => $block_id) {
847 847
                 if (is_numeric($block_id)) {
848 848
                     // Updated block
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function treePageBlockEdit(Request $request, Tree $tree, User $user): Response
49 49
     {
50
-        $block_id = (int)$request->get('block_id');
50
+        $block_id = (int) $request->get('block_id');
51 51
         $block    = $this->treeBlock($request, $user);
52 52
         $title    = $block->getTitle() . ' — ' . I18N::translate('Preferences');
53 53
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function treePageBlockUpdate(Request $request, Tree $tree, User $user): RedirectResponse
73 73
     {
74
-        $block_id = (int)$request->get('block_id');
74
+        $block_id = (int) $request->get('block_id');
75 75
         $block    = $this->treeBlock($request, $user);
76 76
 
77 77
         $block->configureBlock($tree, $block_id);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     private function treeBlock(Request $request, User $user): ModuleBlockInterface
91 91
     {
92
-        $block_id = (int)$request->get('block_id');
92
+        $block_id = (int) $request->get('block_id');
93 93
 
94 94
         $block_info = Database::prepare(
95 95
             "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id"
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function userPageBlockEdit(Request $request, Tree $tree, User $user): Response
127 127
     {
128
-        $block_id = (int)$request->get('block_id');
128
+        $block_id = (int) $request->get('block_id');
129 129
         $block    = $this->userBlock($request, $user);
130 130
         $title    = $block->getTitle() . ' — ' . I18N::translate('Preferences');
131 131
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function userPageBlockUpdate(Request $request, Tree $tree, User $user): RedirectResponse
150 150
     {
151
-        $block_id = (int)$request->get('block_id');
151
+        $block_id = (int) $request->get('block_id');
152 152
         $block    = $this->userBlock($request, $user);
153 153
 
154 154
         $block->configureBlock($tree, $block_id);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     private function userBlock(Request $request, User $user): ModuleBlockInterface
168 168
     {
169
-        $block_id = (int)$request->get('block_id');
169
+        $block_id = (int) $request->get('block_id');
170 170
 
171 171
         $block_info = Database::prepare(
172 172
             "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id"
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             throw new NotFoundHttpException($block_info->module_name . ' is not a block');
185 185
         }
186 186
 
187
-        $block_owner_id = (int)$block_info->user_id;
187
+        $block_owner_id = (int) $block_info->user_id;
188 188
 
189 189
         if ($block_owner_id !== $user->getUserId() && !Auth::isAdmin()) {
190 190
             throw new AccessDeniedHttpException('You are not allowed to edit this block');
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function treePageBlock(Request $request, Tree $tree): Response
232 232
     {
233
-        $block_id = (int)$request->get('block_id');
233
+        $block_id = (int) $request->get('block_id');
234 234
 
235 235
         $block = Database::prepare(
236 236
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id = :tree_id AND user_id IS NULL"
@@ -296,8 +296,8 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function treePageDefaultUpdate(Request $request): RedirectResponse
298 298
     {
299
-        $main_blocks = (array)$request->get('main');
300
-        $side_blocks = (array)$request->get('side');
299
+        $main_blocks = (array) $request->get('main');
300
+        $side_blocks = (array) $request->get('side');
301 301
 
302 302
         $this->updateTreeBlocks(-1, $main_blocks, $side_blocks);
303 303
 
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
      */
342 342
     public function treePageUpdate(Request $request, Tree $tree): RedirectResponse
343 343
     {
344
-        $defaults = (bool)$request->get('defaults');
344
+        $defaults = (bool) $request->get('defaults');
345 345
 
346 346
         if ($defaults) {
347 347
             $main_blocks = $this->getBlocksForTreePage(-1, AUth::PRIV_NONE, 'main');
348 348
             $side_blocks = $this->getBlocksForTreePage(-1, Auth::PRIV_NONE, 'side');
349 349
         } else {
350
-            $main_blocks = (array)$request->get('main');
351
-            $side_blocks = (array)$request->get('side');
350
+            $main_blocks = (array) $request->get('main');
351
+            $side_blocks = (array) $request->get('side');
352 352
         }
353 353
 
354 354
         $this->updateTreeBlocks($tree->getTreeId(), $main_blocks, $side_blocks);
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public function userPageBlock(Request $request, Tree $tree, User $user): Response
397 397
     {
398
-        $block_id = (int)$request->get('block_id');
398
+        $block_id = (int) $request->get('block_id');
399 399
 
400 400
         $block = Database::prepare(
401 401
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id IS NULL AND user_id = :user_id"
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
      */
461 461
     public function userPageDefaultUpdate(Request $request): RedirectResponse
462 462
     {
463
-        $main_blocks = (array)$request->get('main');
464
-        $side_blocks = (array)$request->get('side');
463
+        $main_blocks = (array) $request->get('main');
464
+        $side_blocks = (array) $request->get('side');
465 465
 
466 466
         $this->updateUserBlocks(-1, $main_blocks, $side_blocks);
467 467
 
@@ -507,14 +507,14 @@  discard block
 block discarded – undo
507 507
      */
508 508
     public function userPageUpdate(Request $request, Tree $tree, User $user): RedirectResponse
509 509
     {
510
-        $defaults = (bool)$request->get('defaults');
510
+        $defaults = (bool) $request->get('defaults');
511 511
 
512 512
         if ($defaults) {
513 513
             $main_blocks = $this->getBlocksForUserPage(-1, -1, AUth::PRIV_NONE, 'main');
514 514
             $side_blocks = $this->getBlocksForUserPage(-1, -1, Auth::PRIV_NONE, 'side');
515 515
         } else {
516
-            $main_blocks = (array)$request->get('main');
517
-            $side_blocks = (array)$request->get('side');
516
+            $main_blocks = (array) $request->get('main');
517
+            $side_blocks = (array) $request->get('side');
518 518
         }
519 519
 
520 520
         $this->updateUserBlocks($user->getUserId(), $main_blocks, $side_blocks);
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public function userPageUserEdit(Request $request): Response
533 533
     {
534
-        $user_id     = (int)$request->get('user_id');
534
+        $user_id     = (int) $request->get('user_id');
535 535
         $user        = User::find($user_id);
536 536
         $main_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'main');
537 537
         $side_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'side');
@@ -560,9 +560,9 @@  discard block
 block discarded – undo
560 560
      */
561 561
     public function userPageUserUpdate(Request $request): RedirectResponse
562 562
     {
563
-        $user_id     = (int)$request->get('user_id');
564
-        $main_blocks = (array)$request->get('main');
565
-        $side_blocks = (array)$request->get('side');
563
+        $user_id     = (int) $request->get('user_id');
564
+        $main_blocks = (array) $request->get('main');
565
+        $side_blocks = (array) $request->get('side');
566 566
 
567 567
         $this->updateUserBlocks($user_id, $main_blocks, $side_blocks);
568 568
 
Please login to merge, or discard this patch.
resources/views/admin/clean-data.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@
 block discarded – undo
13 13
 	<?= csrf_field() ?>
14 14
 	<ul class="fa-ul">
15 15
 		<?php
16
-		foreach ($entries as $entry) {
17
-			if (in_array($entry, $protected)) {
18
-				echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>';
19
-			} else {
20
-				echo '<li><span class="fa-li">' . view('icons/delete') . '</span>';
21
-				echo '<label>';
22
-				echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> ';
23
-				echo e($entry);
24
-				echo '</label></li>';
25
-			}
26
-		}
27
-		?>
16
+        foreach ($entries as $entry) {
17
+            if (in_array($entry, $protected)) {
18
+                echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>';
19
+            } else {
20
+                echo '<li><span class="fa-li">' . view('icons/delete') . '</span>';
21
+                echo '<label>';
22
+                echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> ';
23
+                echo e($entry);
24
+                echo '</label></li>';
25
+            }
26
+        }
27
+        ?>
28 28
 	</ul>
29 29
 
30 30
 	<button class="btn btn-danger" type="submit">
Please login to merge, or discard this patch.
resources/views/modules/faq/config.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 <p>
9 9
 	<?= /* I18N: FAQ = “Frequently Asked Question” */
10
-	I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?>
10
+    I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?>
11 11
 	<?= I18N::translate('You may use HTML to format the answer and to add links to other websites.') ?>
12 12
 </p>
13 13
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	<a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link">
29 29
         <?= view('icons/add') ?>
30 30
 		<?= /* I18N: FAQ = “Frequently Asked Question” */
31
-		I18N::translate('Add an FAQ') ?>
31
+        I18N::translate('Add an FAQ') ?>
32 32
 	</a>
33 33
 </p>
34 34
 
Please login to merge, or discard this patch.
app/Functions/FunctionsRtl.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                         if ($openParIndex !== false) {
293 293
                             // Opening parentheses always inherit the following directionality
294 294
                             self::$waitingText .= $currentLetter;
295
-                            $workingText       = substr($workingText, $currentLen);
295
+                            $workingText = substr($workingText, $currentLen);
296 296
                             while (true) {
297 297
                                 if ($workingText === '') {
298 298
                                     break;
@@ -300,13 +300,13 @@  discard block
 block discarded – undo
300 300
                                 if (substr($workingText, 0, 1) === ' ') {
301 301
                                     // Spaces following this left parenthesis inherit the following directionality too
302 302
                                     self::$waitingText .= ' ';
303
-                                    $workingText       = substr($workingText, 1);
303
+                                    $workingText = substr($workingText, 1);
304 304
                                     continue;
305 305
                                 }
306 306
                                 if (substr($workingText, 0, 6) === '&nbsp;') {
307 307
                                     // Spaces following this left parenthesis inherit the following directionality too
308 308
                                     self::$waitingText .= '&nbsp;';
309
-                                    $workingText       = substr($workingText, 6);
309
+                                    $workingText = substr($workingText, 6);
310 310
                                     continue;
311 311
                                 }
312 312
                                 break;
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
                         // Exceptions to this rule will be handled later during final clean-up.
324 324
                         //
325 325
                         self::$waitingText .= $currentLetter;
326
-                        $workingText       = substr($workingText, $currentLen);
326
+                        $workingText = substr($workingText, $currentLen);
327 327
                         if (self::$currentState != '') {
328
-                            $result            .= self::$waitingText;
328
+                            $result .= self::$waitingText;
329 329
                             self::$waitingText = '';
330 330
                         }
331 331
                         break 2; // double break because we're waiting for more information
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                 }
457 457
                 if (substr($result . "\n", 0, self::LENGTH_START) != self::START_LTR && substr($result . "\n", 0, self::LENGTH_START) != self::START_RTL) {
458 458
                     $leadingText .= substr($result, 0, 1);
459
-                    $result      = substr($result, 1);
459
+                    $result = substr($result, 1);
460 460
                     continue;
461 461
                 }
462 462
                 $result = substr($result, 0, self::LENGTH_START) . $leadingText . substr($result, self::LENGTH_START);
@@ -591,11 +591,11 @@  discard block
 block discarded – undo
591 591
     public static function breakCurrentSpan(&$result)
592 592
     {
593 593
         // Interrupt the current span, insert that <br>, and then continue the current span
594
-        $result            .= self::$waitingText;
594
+        $result .= self::$waitingText;
595 595
         self::$waitingText = '';
596 596
 
597 597
         $breakString = '<' . self::$currentState . 'br>';
598
-        $result      .= $breakString;
598
+        $result .= $breakString;
599 599
     }
600 600
 
601 601
     /**
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                 break;
649 649
             } // No more numeric strings
650 650
 
651
-            $tempResult    .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string
651
+            $tempResult .= substr($textSpan, 0, $posLRE + 3); // Copy everything preceding the numeric string
652 652
             $numericString = substr($textSpan, $posLRE + 3, $posPDF - $posLRE); // Separate the entire numeric string
653 653
             $textSpan      = substr($textSpan, $posPDF + 3);
654 654
             $posColon      = strpos($numericString, ':');
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
         while ($string) {
1141 1141
             if (mb_strlen($string) <= $width) {
1142 1142
                 // Do not wrap any text that is less than the output area.
1143
-                $out    .= $string;
1143
+                $out .= $string;
1144 1144
                 $string = '';
1145 1145
             } else {
1146 1146
                 $sub1 = mb_substr($string, 0, $width + 1);
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
                 if ($spacepos === false) {
1155 1155
                     // No space on line?
1156 1156
                     if ($cut) {
1157
-                        $out    .= $sub . $sep;
1157
+                        $out .= $sub . $sep;
1158 1158
                         $string = mb_substr($string, mb_strlen($sub));
1159 1159
                     } else {
1160 1160
                         $spacepos = strpos($string, ' ');
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
                     }
1169 1169
                 } else {
1170 1170
                     // Split at space;
1171
-                    $out    .= substr($string, 0, $spacepos) . $sep;
1171
+                    $out .= substr($string, 0, $spacepos) . $sep;
1172 1172
                     $string = substr($string, $spacepos + 1);
1173 1173
                 }
1174 1174
             }
Please login to merge, or discard this patch.
resources/views/admin/site-preferences.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@  discard block
 block discarded – undo
14 14
 	<div class="row form-group">
15 15
 		<label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label">
16 16
 			<?= /* I18N: A configuration setting */
17
-			I18N::translate('Data folder') ?>
17
+            I18N::translate('Data folder') ?>
18 18
 		</label>
19 19
 		<div class="col-sm-9">
20 20
 			<input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required>
21 21
 			<p class="small text-muted">
22 22
 				<?= /* I18N: Help text for the "Data folder" site configuration setting */
23
-				I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?>
23
+                I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?>
24 24
 			</p>
25 25
 			<p class="small text-muted">
26 26
 				<?= /* I18N: “Apache” is a software program. */
27
-				I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?>
27
+                I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?>
28 28
 			</p>
29 29
 			<p class="small text-muted">
30 30
 				<?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?>
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 	<div class="row form-group">
40 40
 		<label for="MEMORY_LIMIT" class="col-sm-3 col-form-label">
41 41
 			<?= /* I18N: A configuration setting */
42
-			I18N::translate('Memory limit') ?>
42
+            I18N::translate('Memory limit') ?>
43 43
 		</label>
44 44
 		<div class="col-sm-9">
45 45
 			<input type="text" class="form-control" id="MEMORY_LIMIT" name="MEMORY_LIMIT" value="<?= e(Site::getPreference('MEMORY_LIMIT')) ?>" pattern="[0-9]+[KMG]" placeholder="<?= get_cfg_var('memory_limit') ?>" maxlength="255">
46 46
 			<p class="small text-muted">
47 47
 				<?= /* I18N: %s is an amount of memory, such as 32MB */
48
-				I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?>
48
+                I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?>
49 49
 				<?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?>
50 50
 				<?= I18N::translate('Leave this blank to use the default value.') ?>
51 51
 			</p>
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 	<div class="row form-group">
57 57
 		<label for="MAX_EXECUTION_TIME" class="col-sm-3 col-form-label">
58 58
 			<?= /* I18N: A configuration setting */
59
-			I18N::translate('PHP time limit') ?>
59
+            I18N::translate('PHP time limit') ?>
60 60
 		</label>
61 61
 		<div class="col-sm-9">
62 62
 			<input type="text" class="form-control" id="MAX_EXECUTION_TIME" name="MAX_EXECUTION_TIME" value="<?= e(Site::getPreference('MAX_EXECUTION_TIME')) ?>" pattern="[0-9]*" placeholder="<?= get_cfg_var('max_execution_time') ?>" maxlength="255">
63 63
 			<p class="small text-muted">
64 64
 				<?= I18N::plural(
65
-					'By default, your server allows scripts to run for %s second.',
66
-					'By default, your server allows scripts to run for %s seconds.',
67
-					get_cfg_var('max_execution_time'), I18N::number((float) get_cfg_var('max_execution_time')));
68
-				?>
65
+                    'By default, your server allows scripts to run for %s second.',
66
+                    'By default, your server allows scripts to run for %s seconds.',
67
+                    get_cfg_var('max_execution_time'), I18N::number((float) get_cfg_var('max_execution_time')));
68
+                ?>
69 69
 				<?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?>
70 70
 				<?= I18N::translate('Leave this blank to use the default value.') ?>
71 71
 			</p>
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 	<div class="row form-group">
90 90
 		<label for="THEME_DIR" class="col-sm-3 col-form-label">
91 91
 			<?= /* I18N: A configuration setting */
92
-			I18N::translate('Default theme') ?>
92
+            I18N::translate('Default theme') ?>
93 93
 		</label>
94 94
 		<div class="col-sm-9">
95 95
 			<?= Bootstrap4::select($all_themes, Site::getPreference('THEME_DIR'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?>
96 96
 			<p class="small text-muted">
97 97
 				<?= /* I18N: Help text for the "Default theme" site configuration setting */
98
-				I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
98
+                I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
99 99
 			</p>
100 100
 			<p class="small text-muted">
101 101
 				<?= I18N::translate('Themes can be selected at three levels: user, family tree, and website. User preferences take priority over family tree preferences, which in turn take priority over the website preferences. Selecting “default theme” at one level will use the theme at the next level.') ?>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		<div class="row">
109 109
 			<legend class="col-form-label col-sm-3">
110 110
 				<?= /* I18N: A configuration setting */
111
-				I18N::translate('Allow users to select their own theme') ?>
111
+                I18N::translate('Allow users to select their own theme') ?>
112 112
 			</legend>
113 113
 			<div class="col-sm-9">
114 114
 				<?= Bootstrap4::radioButtons('ALLOW_USER_THEMES', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_USER_THEMES'), true) ?>
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
 		<div class="row">
122 122
 			<legend class="col-form-label col-sm-3">
123 123
 				<?= /* I18N: A configuration setting */
124
-				I18N::translate('Show list of family trees') ?>
124
+                I18N::translate('Show list of family trees') ?>
125 125
 			</legend>
126 126
 			<div class="col-sm-9">
127 127
 				<?= Bootstrap4::radioButtons('ALLOW_CHANGE_GEDCOM', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_CHANGE_GEDCOM'), true) ?>
128 128
 				<p class="small text-muted">
129 129
 					<?= /* I18N: Help text for the “Show list of family trees” site configuration setting */
130
-					I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?>
130
+                    I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?>
131 131
 				</p>
132 132
 			</div>
133 133
 		</div>
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function edit(Tree $tree, User $user): Response
49 49
     {
50
-        $allow_user_themes    = (bool)Site::getPreference('ALLOW_USER_THEMES');
50
+        $allow_user_themes    = (bool) Site::getPreference('ALLOW_USER_THEMES');
51 51
         $my_individual_record = Individual::getInstance($tree->getUserPreference(Auth::user(), 'gedcomid'), $tree);
52 52
         $contact_methods      = FunctionsEdit::optionsContactMethods();
53 53
         $default_individual   = Individual::getInstance($tree->getUserPreference(Auth::user(), 'rootid'), $tree);
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function update(Request $request, Tree $tree, User $user): RedirectResponse
84 84
     {
85
-        $contact_method = (string)$request->get('contact_method');
86
-        $email          = (string)$request->get('email');
87
-        $language       = (string)$request->get('language');
88
-        $real_name      = (string)$request->get('real_name');
89
-        $password       = (string)$request->get('password');
90
-        $rootid         = (string)$request->get('root_id');
91
-        $theme          = (string)$request->get('theme');
92
-        $time_zone      = (string)$request->get('timezone');
93
-        $user_name      = (string)$request->get('user_name');
94
-        $visible_online = (string)$request->get('visible_online');
85
+        $contact_method = (string) $request->get('contact_method');
86
+        $email          = (string) $request->get('email');
87
+        $language       = (string) $request->get('language');
88
+        $real_name      = (string) $request->get('real_name');
89
+        $password       = (string) $request->get('password');
90
+        $rootid         = (string) $request->get('root_id');
91
+        $theme          = (string) $request->get('theme');
92
+        $time_zone      = (string) $request->get('timezone');
93
+        $user_name      = (string) $request->get('user_name');
94
+        $visible_online = (string) $request->get('visible_online');
95 95
 
96 96
         // Change the password
97 97
         if ($password !== '') {
Please login to merge, or discard this patch.
app/Http/Controllers/EditGedcomRecordController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
     public function editRawRecordAction(Request $request, Tree $tree): Response
291 291
     {
292 292
         $xref     = $request->get('xref');
293
-        $facts    = (array)$request->get('fact');
294
-        $fact_ids = (array)$request->get('fact_id');
293
+        $facts    = (array) $request->get('fact');
294
+        $fact_ids = (array) $request->get('fact_id');
295 295
         $record   = GedcomRecord::getInstance($xref, $tree);
296 296
 
297 297
         $this->checkRecordAccess($record, true);
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         $record = GedcomRecord::getInstance($xref, $tree);
396 396
         $this->checkRecordAccess($record, true);
397 397
 
398
-        $keep_chan = (bool)$request->get('keep_chan');
398
+        $keep_chan = (bool) $request->get('keep_chan');
399 399
 
400 400
         $this->glevels = $request->get('glevels', []);
401 401
         $this->tag     = $request->get('tag', []);
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
         $newged = '';
416 416
         if (!empty($_POST['NAME'])) {
417
-            $newged     .= "\n1 NAME " . $_POST['NAME'];
417
+            $newged .= "\n1 NAME " . $_POST['NAME'];
418 418
             $name_facts = [
419 419
                 'TYPE',
420 420
                 'NPFX',
Please login to merge, or discard this patch.
app/Http/Controllers/AutocompleteController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $pages = [];
85 85
 
86 86
         // Escape the query for MySQL and PHP, converting spaces to wildcards.
87
-        $like_query  = strtr($query, [
87
+        $like_query = strtr($query, [
88 88
             '_' => '\\_',
89 89
             '%' => '\\%',
90 90
             ' ' => '%',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function select2Family(Request $request, Tree $tree): JsonResponse
208 208
     {
209
-        $page  = (int)$request->get('page');
209
+        $page  = (int) $request->get('page');
210 210
         $query = $request->get('q');
211 211
 
212 212
         return new JsonResponse(Select2::familySearch($tree, $page, $query));
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     public function select2Flag(Request $request): JsonResponse
221 221
     {
222 222
         $page  = $request->get('page');
223
-        $query = (int)$request->get('q');
223
+        $query = (int) $request->get('q');
224 224
 
225 225
         return new JsonResponse(Select2::flagSearch($page, $query));
226 226
     }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function select2Individual(Request $request, Tree $tree): JsonResponse
235 235
     {
236
-        $page  = (int)$request->get('page');
236
+        $page  = (int) $request->get('page');
237 237
         $query = $request->get('q');
238 238
 
239 239
         return new JsonResponse(Select2::individualSearch($tree, $page, $query));
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function select2MediaObject(Request $request, Tree $tree): JsonResponse
249 249
     {
250
-        $page  = (int)$request->get('page');
250
+        $page  = (int) $request->get('page');
251 251
         $query = $request->get('q');
252 252
 
253 253
         return new JsonResponse(Select2::mediaObjectSearch($tree, $page, $query));
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     public function select2Note(Request $request, Tree $tree): JsonResponse
263 263
     {
264
-        $page  = (int)$request->get('page');
264
+        $page  = (int) $request->get('page');
265 265
         $query = $request->get('q');
266 266
 
267 267
         return new JsonResponse(Select2::noteSearch($tree, $page, $query));
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     public function select2Place(Request $request, Tree $tree): JsonResponse
277 277
     {
278
-        $page  = (int)$request->get('page');
278
+        $page  = (int) $request->get('page');
279 279
         $query = $request->get('q');
280 280
 
281 281
         return new JsonResponse(Select2::placeSearch($tree, $page, $query, true));
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function select2Repository(Request $request, Tree $tree): JsonResponse
291 291
     {
292
-        $page  = (int)$request->get('page');
292
+        $page  = (int) $request->get('page');
293 293
         $query = $request->get('q');
294 294
 
295 295
         return new JsonResponse(Select2::repositorySearch($tree, $page, $query));
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
      */
304 304
     public function select2Source(Request $request, Tree $tree): JsonResponse
305 305
     {
306
-        $page  = (int)$request->get('page');
306
+        $page  = (int) $request->get('page');
307 307
         $query = $request->get('q');
308 308
 
309 309
         return new JsonResponse(Select2::sourceSearch($tree, $page, $query));
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      */
318 318
     public function select2Submitter(Request $request, Tree $tree): JsonResponse
319 319
     {
320
-        $page  = (int)$request->get('page');
320
+        $page  = (int) $request->get('page');
321 321
         $query = $request->get('q');
322 322
 
323 323
         return new JsonResponse(Select2::submitterSearch($tree, $page, $query));
Please login to merge, or discard this patch.
app/Http/Controllers/PendingChangesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $url       = $request->get('url', '');
100 100
         $xref      = $request->get('xref', '');
101
-        $change_id = (int)$request->get('change_id');
101
+        $change_id = (int) $request->get('change_id');
102 102
 
103 103
         $changes = Database::prepare(
104 104
             "SELECT change_id, xref, old_gedcom, new_gedcom" .
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     {
205 205
         $url       = $request->get('url', '');
206 206
         $xref      = $request->get('xref', '');
207
-        $change_id = (int)$request->get('change_id');
207
+        $change_id = (int) $request->get('change_id');
208 208
 
209 209
         // Reject a change, and subsequent changes to the same record
210 210
         Database::prepare(
Please login to merge, or discard this patch.