Completed
Pull Request — master (#1854)
by Rico
149:06 queued 135:36
created
resources/views/family-page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 
8 8
 <?php if ($record->isPendingDeletion()): ?>
9 9
 	<?php if (Auth::isModerator($record->getTree())): ?>
10
-		<?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) .  '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
10
+		<?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
11 11
 	<?php elseif (Auth::isEditor($record->getTree())): ?>
12 12
 		<?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
13 13
 	<?php endif ?>
14 14
 <?php elseif ($record->isPendingAddition()): ?>
15 15
 	<?php if (Auth::isModerator($record->getTree())): ?>
16
-		<?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>' ) . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
16
+		<?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
17 17
 	<?php elseif (Auth::isEditor($record->getTree())): ?>
18 18
 		<?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
19 19
 	<?php endif ?>
Please login to merge, or discard this patch.
app/Http/Controllers/PlaceHierarchyController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $note       = false;
61 61
 
62 62
         if ($showmap) {
63
-            $note    = true;
63
+            $note = true;
64 64
             $content .= view('place-map', [
65 65
                 'module' => self::MAP_MODULE,
66 66
                 'ref'    => $fqpn,
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
         switch ($action) {
73 73
             case 'list':
74 74
                 $nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')];
75
-                $content    .= view('place-list', $this->getList($tree));
75
+                $content .= view('place-list', $this->getList($tree));
76 76
                 break;
77 77
             case 'hierarchy':
78 78
             case 'hierarchy-e':
79 79
                 $nextaction = ['list' => I18N::translate('Show all places in a list')];
80 80
                 $data       = $this->getHierarchy($tree, $place, $parent);
81
-                $content    .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
81
+                $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
82 82
                 if (null === $data || $action === 'hierarchy-e') {
83 83
                     $content .= view('place-events', $this->getEvents($tree, $place));
84 84
                 }
Please login to merge, or discard this patch.
app/Http/Middleware/PageHitCounter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
      */
158 158
     public function getCount(Tree $tree, $page, $parameter): int
159 159
     {
160
-        return (int)Database::prepare(
160
+        return (int) Database::prepare(
161 161
             "SELECT page_count FROM `##hit_counter` WHERE gedcom_id = :tree_id AND page_name = :page AND page_parameter = :parameter"
162 162
         )->execute([
163 163
             'tree_id'   => $tree->getTreeId(),
Please login to merge, or discard this patch.
resources/views/modules/pedigree-map/event-sidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
     </a>
10 10
 <?php endif ?>
11 11
 
12
-<?php if($value): ?>
12
+<?php if ($value): ?>
13 13
     <span>
14 14
         <?= $value ?>
15 15
     </span>
16 16
 <?php endif ?>
17 17
 
18 18
 <div>
19
-    <?php if($addtag): ?>
19
+    <?php if ($addtag): ?>
20 20
         <?= GedcomTag::getLabel('BIRT') ?>:
21 21
     <?php endif ?>
22 22
     <?= $date ?>
Please login to merge, or discard this patch.
resources/views/modules/places/event-sidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
     </a>
10 10
 <?php endif ?>
11 11
 
12
-<?php if($value): ?>
12
+<?php if ($value): ?>
13 13
     <span>
14 14
         <?= $value ?>
15 15
     </span>
16 16
 <?php endif ?>
17 17
 
18 18
 <div>
19
-    <?php if($addtag): ?>
19
+    <?php if ($addtag): ?>
20 20
         <?= GedcomTag::getLabel('BIRT') ?>:
21 21
     <?php endif ?>
22 22
     <?= $date ?>
Please login to merge, or discard this patch.
resources/views/admin/map-import-form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 				</div>
24 24
 				<select id="serverfile" name="serverfile" class="form-control">
25 25
                     <option selected value=""></option>
26
-                    <?php foreach($files as $file): ?>
26
+                    <?php foreach ($files as $file): ?>
27 27
                         <option value="<?= e($file) ?>">
28 28
                             <?= e($file) ?>
29 29
                         </option>
Please login to merge, or discard this patch.
resources/views/admin/locations.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,12 +32,10 @@
 block discarded – undo
32 32
                 </a>
33 33
             </th>
34 34
 			<td>
35
-				<?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') :
36
-                    strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
35
+				<?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
37 36
 			</td>
38 37
 			<td>
39
-				<?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') :
40
-                    strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
38
+				<?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
41 39
 			</td>
42 40
 			<td>
43 41
 				<?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?>
Please login to merge, or discard this patch.
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.
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.