Completed
Push — openstreetmap ( 8ce70d...10d5a2 )
by Greg
07:41
created
app/Http/Controllers/BranchesController.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -111,24 +111,24 @@
 block discarded – undo
111 111
 	 * @return Individual[]
112 112
 	 */
113 113
 	protected function allAncestors(Individual $individual): array {
114
-	    /** @var Individual[] $ancestors */
115
-        $ancestors = [
116
-            1 => $individual,
117
-        ];
114
+			/** @var Individual[] $ancestors */
115
+				$ancestors = [
116
+						1 => $individual,
117
+				];
118 118
 
119
-        do {
120
-            $sosa = key($ancestors);
119
+				do {
120
+						$sosa = key($ancestors);
121 121
 
122 122
 			$family = $ancestors[$sosa]->getPrimaryChildFamily();
123 123
 
124 124
 			if ($family !== null) {
125
-                if ($family->getHusband() !== null) {
126
-                    $ancestors[$sosa * 2] = $family->getHusband();
127
-                }
128
-                if ($family->getWife() !== null) {
129
-                    $ancestors[$sosa * 2 + 1] = $family->getWife();
130
-                }
131
-            }
125
+								if ($family->getHusband() !== null) {
126
+										$ancestors[$sosa * 2] = $family->getHusband();
127
+								}
128
+								if ($family->getWife() !== null) {
129
+										$ancestors[$sosa * 2 + 1] = $family->getWife();
130
+								}
131
+						}
132 132
 		} while (next($ancestors));
133 133
 
134 134
 		return $ancestors;
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/admin-config.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 <?= view('admin/breadcrumbs', [
7 7
 		'links' => [route('admin-control-panel') => I18N::translate('Control panel'),
8
-		            route('admin-modules') => I18N::translate('Module administration'),
8
+								route('admin-modules') => I18N::translate('Module administration'),
9 9
 					$title
10 10
 		]]) ?>
11 11
 
Please login to merge, or discard this patch.
resources/views/places-page.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
         <div class="center">
22 22
             <?php if ($showeventslink): ?>
23 23
                     <a class="formField" href= <?= e(route('place-hierarchy',
24
-                            ['ged' => $tree->getName(), 'parent' => $parent, 'action' => 'hierarchy-e']
25
-                        )
26
-                    ) ?>><?= I18N::translate('View table of events occurring in %s', $place) ?></a>
24
+														['ged' => $tree->getName(), 'parent' => $parent, 'action' => 'hierarchy-e']
25
+												)
26
+										) ?>><?= I18N::translate('View table of events occurring in %s', $place) ?></a>
27 27
                 |
28 28
             <?php endif ?>
29 29
             <a href="<?= e(route('place-hierarchy', ['ged' => $tree->getName(), 'action' => key($nextaction)]))
30
-                ?>"><?= current($nextaction) ?></a>
30
+								?>"><?= current($nextaction) ?></a>
31 31
         </div>
32 32
 	</div>
33 33
 </div>
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/admin-import-form.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@
 block discarded – undo
6 6
 
7 7
 <h3><?= $title ?></h3>
8 8
 <form id="upload_form" method="post" enctype="multipart/form-data" action="<?=
9
-    e(route('admin-module',[
10
-        'module' => $module,
11
-        'action' => 'AdminImport',
12
-    ])) ?>">
9
+		e(route('admin-module',[
10
+				'module' => $module,
11
+				'action' => 'AdminImport',
12
+		])) ?>">
13 13
 	<?= csrf_field() ?>
14 14
 	<input type="hidden" name="parent_id" value="<?= $parent_id ?>">
15 15
 	<input type="hidden" name="inactive" value="<?= $inactive ?>">
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/admin-places.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 </div>
20 20
 <form method="POST"
21 21
 	  action="<?=e(route('admin-module',
22
-		  ['module' => $module, 'action' => 'AdminPlaces', 'parent_id' => $parent_id])) ?>">
22
+			['module' => $module, 'action' => 'AdminPlaces', 'parent_id' => $parent_id])) ?>">
23 23
 
24 24
 	<?= csrf_field() ?>
25 25
 	<?= Bootstrap4::checkbox(
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 		<tr>
55 55
             <td>
56 56
                 <a href="<?= e(route('admin-module',
57
-					   ['module' => $module,
58
-					    'action' => 'AdminPlaces',
59
-					    'parent_id' => $place->pl_id,
60
-					    'inactive' => $inactive]
61
-				   )
62
-				   ) ?>">
57
+						 ['module' => $module,
58
+							'action' => 'AdminPlaces',
59
+							'parent_id' => $place->pl_id,
60
+							'inactive' => $inactive]
61
+					 )
62
+					 ) ?>">
63 63
 					<?= e($place->pl_place) ?>
64 64
                     <span class="badge badge-pill badge-<?= $place->badge ?>">
65 65
 				        <?= I18N::number($place->child_count) ?>
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
             </td>
69 69
 			<td>
70 70
 				<?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') :
71
-                    strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
71
+										strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
72 72
 			</td>
73 73
 			<td>
74 74
 				<?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') :
75
-                    strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
75
+										strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
76 76
 			</td>
77 77
 			<td>
78 78
 				<?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?>
Please login to merge, or discard this patch.
app/Module/OpenStreetMapModule.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1067,9 +1067,11 @@  discard block
 block discarded – undo
1067 1067
 		$delimiter   = '';
1068 1068
 		$field_names = ['pl_level', 'pl_long', 'pl_lati', 'pl_zoom', 'pl_icon', 'fqpn'];
1069 1069
 
1070
-		if ($serverfile !== '') {  // first choice is file on server
1070
+		if ($serverfile !== '') {
1071
+// first choice is file on server
1071 1072
 			$filename = WT_MODULES_DIR . $this->getName() . '/extra/' . $serverfile;
1072
-		} elseif ($_FILES['localfile']['error'] === UPLOAD_ERR_OK) { // 2nd choice is local file
1073
+		} elseif ($_FILES['localfile']['error'] === UPLOAD_ERR_OK) {
1074
+// 2nd choice is local file
1073 1075
 			$filename = $_FILES['localfile']['tmp_name'];
1074 1076
 		}
1075 1077
 
@@ -1090,7 +1092,8 @@  discard block
 block discarded – undo
1090 1092
 					$delimiter = ',';
1091 1093
 				}
1092 1094
 				if ($delimiter !== '') {
1093
-					if (!is_numeric($record[0])) { // lose the header
1095
+					if (!is_numeric($record[0])) {
1096
+// lose the header
1094 1097
 						array_shift($input_array);
1095 1098
 					}
1096 1099
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 			case 'BaseData':
530 530
 				$varName = (self::$map_selections['style'] === '') ? '' : self::$map_providers[self::$map_selections['provider']]['styles'][self::$map_selections['style']];
531 531
 				$payload = ['selectedProvIndex' => self::$map_selections['provider'],
532
-				            'selectedProvName'  => self::$map_providers[self::$map_selections['provider']]['name'],
533
-				            'selectedStyleName' => $varName,
532
+										'selectedProvName'  => self::$map_providers[self::$map_selections['provider']]['name'],
533
+										'selectedStyleName' => $varName,
534 534
 				];
535 535
 				break;
536 536
 			case 'ProviderStyles':
@@ -543,9 +543,9 @@  discard block
 block discarded – undo
543 543
 					$providers[$key] = $provider['name'];
544 544
 				}
545 545
 				$payload = ['providers'     => $providers,
546
-				            'selectedProv'  => self::$map_selections['provider'],
547
-				            'styles'        => self::$map_providers[self::$map_selections['provider']]['styles'],
548
-				            'selectedStyle' => self::$map_selections['style'],
546
+										'selectedProv'  => self::$map_selections['provider'],
547
+										'styles'        => self::$map_providers[self::$map_selections['provider']]['styles'],
548
+										'selectedStyle' => self::$map_selections['style'],
549 549
 				];
550 550
 				break;
551 551
 			default:
@@ -1105,8 +1105,8 @@  discard block
 block discarded – undo
1105 1105
 					$row    = explode($delimiter, $input_array[0]);
1106 1106
 					$fields = count($row);
1107 1107
 					if ($fields >= 6 &&
1108
-					    (bool)preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1109
-					    (bool)preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1108
+							(bool)preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1109
+							(bool)preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1110 1110
 						$filetype = 'csv';
1111 1111
 					}
1112 1112
 				}
Please login to merge, or discard this patch.
app/Module/SiteMapModule.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 	public function getFileAction(Request $request): Response {
166 166
 		$file = $request->get('file', '');
167 167
 
168
-		if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match))		 {
168
+		if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match)) {
169 169
 			throw new NotFoundHttpException('Bad sitemap file');
170 170
 		}
171 171
 
Please login to merge, or discard this patch.
resources/views/lists/surnames-table.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@  discard block
 block discarded – undo
12 12
 			<th>
13 13
 				<?php if ($route == 'family-list'):?>
14 14
 					<?= I18N::translate('Spouses') ?>
15
-				<?php else: ?>
15
+				<?php else {
16
+	: ?>
16 17
 					<?= I18N::translate('Individuals') ?>
17 18
 				<?php endif ?>
18 19
 			</th>
@@ -43,7 +44,9 @@  discard block
 block discarded – undo
43 44
 					<?php endforeach ?>
44 45
 				</td>
45 46
 
46
-				<td class="text-center" data-sort="<?= array_sum(array_map(function(array $x) { return count($x); }, $surns)) ?>">
47
+				<td class="text-center" data-sort="<?= array_sum(array_map(function(array $x) { return count($x);
48
+}
49
+}, $surns)) ?>">
47 50
 					<?php foreach ($surns as $indis): ?>
48 51
 						<?= I18N::number(count($indis)) ?>
49 52
 						<br>
Please login to merge, or discard this patch.
resources/views/lists/individuals-table.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -319,8 +319,11 @@
 block discarded – undo
319 319
 					<?php if (!isset($unique_indis[$individual->getXref()]) && $age_at_death >= 0 && $age_at_death <= $max_age): ?>
320 320
 						<?php $deat_by_age[$age_at_death] .= $individual->getSex(); ?>
321 321
 					<?php endif ?>
322
-				<?php else: ?>
323
-					<?php $age_at_death = ''; ?>
322
+				<?php else {
323
+	: ?>
324
+					<?php $age_at_death = '';
325
+}
326
+?>
324 327
 					<?php $age_at_death_sort = PHP_INT_MAX; ?>
325 328
 				<?php endif ?>
326 329
 				<td class="center" data-sort="<?= e($age_at_death_sort) ?>">
Please login to merge, or discard this patch.