Completed
Pull Request — master (#1904)
by Rico
07:48
created
resources/views/admin/trees.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 				</div>
29 29
 				<div id="card-tree-content-<?= $managed_tree->getTreeId() ?>" class="collapse<?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? ' show' : '' ?>" role="tabpanel" aria-labelledby="panel-tree-header-<?= $managed_tree->getTreeId() ?>">
30 30
 					<div class="card-body">
31
-						<?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1" )->execute([$managed_tree->getTreeId()])->fetchOne() ?>
31
+						<?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1")->execute([$managed_tree->getTreeId()])->fetchOne() ?>
32 32
 						<?php if ($importing): ?>
33 33
 							<div id="import<?= $managed_tree->getTreeId() ?>" class="col-xs-12">
34 34
 								<div class="progress">
Please login to merge, or discard this patch.
resources/views/edit-account-page.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		</label>
75 75
 		<div class="col-sm-9 wt-page-options-value">
76 76
 			<?= FunctionsEdit::formControlIndividual($tree, $default_individual, ['id' => 'root-id',
77
- 'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?>
77
+    'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?>
78 78
 			<p class="small text-muted" id="root-id-description">
79 79
 				<?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?>
80 80
 			</p>
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 				<?= Bootstrap4::select($themes, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme', 'aria-describedby' => 'theme-description']) ?>
150 150
 				<p class="small text-muted" id="theme-description">
151 151
 					<?= /* I18N: Help text for the "Default theme" site configuration setting */
152
-					I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
152
+                    I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
153 153
 				</p>
154 154
 			</div>
155 155
 		</div>
Please login to merge, or discard this patch.
app/Config.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@
 block discarded – undo
241 241
             ],
242 242
             'CEME'     => [
243 243
                 // CEME is NOT a valid 5.5.1 tag
244
-               //'BURI',
244
+                //'BURI',
245 245
             ],
246 246
             'RELA'     => [
247 247
                 'ASSO',
Please login to merge, or discard this patch.
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   +21 added lines, -21 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
 
@@ -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
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     private function userBlock(Request $request, User $user): ModuleBlockInterface
169 169
     {
170
-        $block_id = (int)$request->get('block_id');
170
+        $block_id = (int) $request->get('block_id');
171 171
 
172 172
         $block_info = Database::prepare(
173 173
             "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id"
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             throw new NotFoundHttpException($block_info->module_name . ' is not a block');
186 186
         }
187 187
 
188
-        $block_owner_id = (int)$block_info->user_id;
188
+        $block_owner_id = (int) $block_info->user_id;
189 189
 
190 190
         if ($block_owner_id !== $user->getUserId() && !Auth::isAdmin()) {
191 191
             throw new AccessDeniedHttpException('You are not allowed to edit this block');
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     public function treePageBlock(Request $request, Tree $tree): Response
233 233
     {
234
-        $block_id = (int)$request->get('block_id');
234
+        $block_id = (int) $request->get('block_id');
235 235
 
236 236
         $block = Database::prepare(
237 237
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id = :tree_id AND user_id IS NULL"
@@ -297,8 +297,8 @@  discard block
 block discarded – undo
297 297
      */
298 298
     public function treePageDefaultUpdate(Request $request): RedirectResponse
299 299
     {
300
-        $main_blocks = (array)$request->get('main');
301
-        $side_blocks = (array)$request->get('side');
300
+        $main_blocks = (array) $request->get('main');
301
+        $side_blocks = (array) $request->get('side');
302 302
 
303 303
         $this->updateTreeBlocks(-1, $main_blocks, $side_blocks);
304 304
 
@@ -342,14 +342,14 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function treePageUpdate(Request $request, Tree $tree): RedirectResponse
344 344
     {
345
-        $defaults = (bool)$request->get('defaults');
345
+        $defaults = (bool) $request->get('defaults');
346 346
 
347 347
         if ($defaults) {
348 348
             $main_blocks = $this->getBlocksForTreePage(-1, AUth::PRIV_NONE, 'main');
349 349
             $side_blocks = $this->getBlocksForTreePage(-1, Auth::PRIV_NONE, 'side');
350 350
         } else {
351
-            $main_blocks = (array)$request->get('main');
352
-            $side_blocks = (array)$request->get('side');
351
+            $main_blocks = (array) $request->get('main');
352
+            $side_blocks = (array) $request->get('side');
353 353
         }
354 354
 
355 355
         $this->updateTreeBlocks($tree->getTreeId(), $main_blocks, $side_blocks);
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function userPageBlock(Request $request, Tree $tree, User $user): Response
398 398
     {
399
-        $block_id = (int)$request->get('block_id');
399
+        $block_id = (int) $request->get('block_id');
400 400
 
401 401
         $block = Database::prepare(
402 402
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id IS NULL AND user_id = :user_id"
@@ -461,8 +461,8 @@  discard block
 block discarded – undo
461 461
      */
462 462
     public function userPageDefaultUpdate(Request $request): RedirectResponse
463 463
     {
464
-        $main_blocks = (array)$request->get('main');
465
-        $side_blocks = (array)$request->get('side');
464
+        $main_blocks = (array) $request->get('main');
465
+        $side_blocks = (array) $request->get('side');
466 466
 
467 467
         $this->updateUserBlocks(-1, $main_blocks, $side_blocks);
468 468
 
@@ -508,14 +508,14 @@  discard block
 block discarded – undo
508 508
      */
509 509
     public function userPageUpdate(Request $request, Tree $tree, User $user): RedirectResponse
510 510
     {
511
-        $defaults = (bool)$request->get('defaults');
511
+        $defaults = (bool) $request->get('defaults');
512 512
 
513 513
         if ($defaults) {
514 514
             $main_blocks = $this->getBlocksForUserPage(-1, -1, AUth::PRIV_NONE, 'main');
515 515
             $side_blocks = $this->getBlocksForUserPage(-1, -1, Auth::PRIV_NONE, 'side');
516 516
         } else {
517
-            $main_blocks = (array)$request->get('main');
518
-            $side_blocks = (array)$request->get('side');
517
+            $main_blocks = (array) $request->get('main');
518
+            $side_blocks = (array) $request->get('side');
519 519
         }
520 520
 
521 521
         $this->updateUserBlocks($user->getUserId(), $main_blocks, $side_blocks);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
      */
533 533
     public function userPageUserEdit(Request $request): Response
534 534
     {
535
-        $user_id     = (int)$request->get('user_id');
535
+        $user_id     = (int) $request->get('user_id');
536 536
         $user        = User::find($user_id);
537 537
         $main_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'main');
538 538
         $side_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'side');
@@ -561,9 +561,9 @@  discard block
 block discarded – undo
561 561
      */
562 562
     public function userPageUserUpdate(Request $request): RedirectResponse
563 563
     {
564
-        $user_id     = (int)$request->get('user_id');
565
-        $main_blocks = (array)$request->get('main');
566
-        $side_blocks = (array)$request->get('side');
564
+        $user_id     = (int) $request->get('user_id');
565
+        $main_blocks = (array) $request->get('main');
566
+        $side_blocks = (array) $request->get('side');
567 567
 
568 568
         $this->updateUserBlocks($user_id, $main_blocks, $side_blocks);
569 569
 
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.
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.