Completed
Push — openstreetmap ( 37385e...885ddc )
by Greg
19:25 queued 11:20
created
app/Module/OpenStreetMapModule.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 						$color            = self::LINE_COLORS[log($id, 2) % $color_count];
298 298
 						$icon['color']    = $color; //make icon color the same as the line
299 299
 						$sosa_points[$id] = $event->getLatLonJSArray();
300
-						$sosa_parent      = (int)floor($id / 2);
300
+						$sosa_parent      = (int) floor($id / 2);
301 301
 						if (array_key_exists($sosa_parent, $sosa_points)) {
302 302
 							// Would like to use a GeometryCollection to hold LineStrings
303 303
 							// rather than generate polylines but the MarkerCluster library
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 								'modules/openstreetmap/event-sidebar',
330 330
 								$event->shortSummary($mapType, $id)
331 331
 							),
332
-							'zoom'     => (int)$event->getZoom(),
332
+							'zoom'     => (int) $event->getZoom(),
333 333
 						],
334 334
 					];
335 335
 				}
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 							'stats'    => $placeStats,
400 400
 						]
401 401
 					),
402
-					'zoom'    => (int)($location->getZoom() ?? 2),
402
+					'zoom'    => (int) ($location->getZoom() ?? 2),
403 403
 				],
404 404
 			];
405 405
 		}
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 		$xref        = $request->get('reference');
452 452
 		$tree        = $request->attributes->get('tree');
453 453
 		$individual  = Individual::getInstance($xref, $tree);
454
-		$generations = (int)$request->get(
454
+		$generations = (int) $request->get(
455 455
 			'generations',
456 456
 			$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS')
457 457
 		);
@@ -500,14 +500,14 @@  discard block
 block discarded – undo
500 500
 						function ($item) {
501 501
 							return preg_replace('/[^a-z\d]/i', '', strtolower($item));
502 502
 						},
503
-						(array)$provider->styles
503
+						(array) $provider->styles
504 504
 					);
505 505
 
506
-					$key = preg_replace('/[^a-z\d]/i', '', strtolower((string)$provider->name));
506
+					$key = preg_replace('/[^a-z\d]/i', '', strtolower((string) $provider->name));
507 507
 
508 508
 					self::$map_providers[$key] = [
509
-						'name'   => (string)$provider->name,
510
-						'styles' => array_combine($style_keys, (array)$provider->styles),
509
+						'name'   => (string) $provider->name,
510
+						'styles' => array_combine($style_keys, (array) $provider->styles),
511 511
 					];
512 512
 				}
513 513
 			} catch (\Exception $ex) {
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 					'provider' => 'openstreetmap',
517 517
 					'style'    => 'mapnik',
518 518
 				];
519
-				self::$map_providers  = [
519
+				self::$map_providers = [
520 520
 					'openstreetmap' => [
521 521
 						'name'   => 'OpenStreetMap',
522 522
 						'styles' => ['mapnik' => 'Mapnik'],
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 		$maxgenerations = $tree->getPreference('MAX_PEDIGREE_GENERATIONS');
570 570
 		$generations    = $request->get('generations', $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
571 571
 
572
-		return (object)[
572
+		return (object) [
573 573
 			'name' => 'modules/openstreetmap/pedigreemap',
574 574
 			'data' => [
575 575
 				'assets'         => $this->assets(),
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 	 * @return object
633 633
 	 */
634 634
 	public function getAdminConfigAction(Request $request) {
635
-		return (object)[
635
+		return (object) [
636 636
 			'name' => 'modules/openstreetmap/admin-config',
637 637
 			'data' => [
638 638
 				'title'        => I18N::translate('Open Street Maps (Configuration)'),
@@ -688,8 +688,8 @@  discard block
 block discarded – undo
688 688
 	 * @throws \Exception
689 689
 	 */
690 690
 	public function getAdminPlacesAction(Request $request) {
691
-		$parent_id   = (int)$request->get('parent_id', 0);
692
-		$inactive    = (bool)$request->get('inactive');
691
+		$parent_id   = (int) $request->get('parent_id', 0);
692
+		$inactive    = (bool) $request->get('inactive');
693 693
 		$hierarchy   = $this->gethierarchy($parent_id);
694 694
 		$title       = I18N::translate('Open Street Maps (Geographic data)');
695 695
 		$breadcrumbs = [
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 		}
713 713
 		$breadcrumbs[] = array_pop($breadcrumbs);
714 714
 
715
-		return (object)[
715
+		return (object) [
716 716
 			'name' => 'modules/openstreetmap/admin-places',
717 717
 			'data' => [
718 718
 				'title'       => $title,
@@ -733,9 +733,9 @@  discard block
 block discarded – undo
733 733
 	 * @throws \Exception
734 734
 	 */
735 735
 	public function getAdminPlaceEditAction(Request $request) {
736
-		$parent_id = (int)$request->get('parent_id', 0);
737
-		$place_id  = (int)$request->get('place_id');
738
-		$inactive  = (int)$request->get('inactive');
736
+		$parent_id = (int) $request->get('parent_id', 0);
737
+		$place_id  = (int) $request->get('place_id');
738
+		$inactive  = (int) $request->get('inactive');
739 739
 		$hierarchy = $this->gethierarchy($place_id);
740 740
 		$fqpn      = empty($hierarchy) ? '' : $hierarchy[0]->fqpn;
741 741
 		$location  = new Location($fqpn);
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 		}
772 772
 		$breadcrumbs[] = $place_id === 0 ? I18N::translate('Add') : I18N::translate('Edit');
773 773
 
774
-		return (object)[
774
+		return (object) [
775 775
 			'name' => 'modules/openstreetmap/admin-place-edit',
776 776
 			'data' => [
777 777
 				'module'      => $this->getName(),
@@ -797,9 +797,9 @@  discard block
 block discarded – undo
797 797
 	 */
798 798
 	public function postAdminSaveAction(Request $request): RedirectResponse {
799 799
 		if (Filter::checkCsrf()) {
800
-			$parent_id = (int)$request->get('parent_id');
801
-			$place_id  = (int)$request->get('place_id');
802
-			$inactive  = (int)$request->get('inactive');
800
+			$parent_id = (int) $request->get('parent_id');
801
+			$place_id  = (int) $request->get('place_id');
802
+			$inactive  = (int) $request->get('inactive');
803 803
 			$lat       = round($request->get('new_place_lati'), 5); // 5 decimal places (locate to within about 1 metre)
804 804
 			$lat       = ($lat < 0 ? 'S' : 'N') . abs($lat);
805 805
 			$lng       = round($request->get('new_place_long'), 5);
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 						  VALUES (:id, :parent, :level, :place, :lng, :lat, :zoom, :icon)"
819 819
 				)->execute(
820 820
 					[
821
-						'id'     => (int)Database::prepare("SELECT MAX(pl_id)+1 FROM `##placelocation`")->fetchOne(),
821
+						'id'     => (int) Database::prepare("SELECT MAX(pl_id)+1 FROM `##placelocation`")->fetchOne(),
822 822
 						'parent' => $parent_id,
823 823
 						'level'  => $level,
824 824
 						'place'  => $request->get('new_place_name'),
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 						'place' => $request->get('new_place_name'),
838 838
 						'lat'   => $request->get('lati_control') . $lat,
839 839
 						'lng'   => $request->get('long_control') . $lng,
840
-						'zoom'  => (int)$request->get('new_zoom_factor'),
840
+						'zoom'  => (int) $request->get('new_zoom_factor'),
841 841
 						'icon'  => $icon,
842 842
 					]
843 843
 				);
@@ -870,9 +870,9 @@  discard block
 block discarded – undo
870 870
 	 */
871 871
 	public function postAdminDeleteRecordAction(Request $request): RedirectResponse {
872 872
 		if (Filter::checkCsrf()) {
873
-			$place_id  = (int)$request->get('place_id');
874
-			$parent_id = (int)$request->get('parent_id');
875
-			$inactive  = (int)$request->get('inactive');
873
+			$place_id  = (int) $request->get('place_id');
874
+			$parent_id = (int) $request->get('parent_id');
875
+			$inactive  = (int) $request->get('inactive');
876 876
 
877 877
 			try {
878 878
 				Database::prepare(
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
 				);
892 892
 			}
893 893
 			// If after deleting there are no more places at this level then go up a level
894
-			$children = (int)Database::prepare(
894
+			$children = (int) Database::prepare(
895 895
 				"SELECT COUNT(pl_id) FROM `##placelocation` WHERE pl_parent_id = :parent_id"
896 896
 			)
897 897
 				->execute(['parent_id' => $parent_id])
@@ -924,9 +924,9 @@  discard block
 block discarded – undo
924 924
 	 * @throws \Exception
925 925
 	 */
926 926
 	public function getAdminExportAction(Request $request): RedirectResponse {
927
-		$parent_id = (int)$request->get('parent_id');
927
+		$parent_id = (int) $request->get('parent_id');
928 928
 		$format    = $request->get('format', 'csv');
929
-		$maxlevel  = (int)Database::prepare("SELECT max(pl_level) FROM `##placelocation`")->execute()->fetchOne();
929
+		$maxlevel  = (int) Database::prepare("SELECT max(pl_level) FROM `##placelocation`")->execute()->fetchOne();
930 930
 		$startfqpn = [];
931 931
 		$hierarchy = $this->gethierarchy($parent_id);
932 932
 		$geojson   = [];
@@ -978,8 +978,8 @@  discard block
 block discarded – undo
978 978
 							)
979 979
 						)
980 980
 					);
981
-					$long = (float)strtr($place['pl_long'], ['E' => '', 'W' => '-', ',' => '.']);
982
-					$lati = (float)strtr($place['pl_lati'], ['N' => '', 'S' => '-', ',' => '.']);
981
+					$long = (float) strtr($place['pl_long'], ['E' => '', 'W' => '-', ',' => '.']);
982
+					$lati = (float) strtr($place['pl_lati'], ['N' => '', 'S' => '-', ',' => '.']);
983 983
 
984 984
 					$geojson['features'][] = [
985 985
 						'type'       => 'Feature',
@@ -1015,8 +1015,8 @@  discard block
 block discarded – undo
1015 1015
 	 * @return object
1016 1016
 	 */
1017 1017
 	public function getAdminImportFormAction(Request $request) {
1018
-		$parent_id   = (int)$request->get('parent_id');
1019
-		$inactive    = (int)$request->get('inactive');
1018
+		$parent_id   = (int) $request->get('parent_id');
1019
+		$inactive    = (int) $request->get('inactive');
1020 1020
 		$breadcrumbs = [
1021 1021
 			route('admin-control-panel') => I18N::translate('Control panel'),
1022 1022
 			route('admin-modules')       => I18N::translate('Module administration'),
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 			)                            => $this->getTitle() . ' (' . I18N::translate('Geographic data') . ')',
1032 1032
 			I18N::translate('Import file'),
1033 1033
 		];
1034
-		$files       = $this->findFiles(WT_MODULES_DIR . $this->getName() . '/extra', ['csv', 'geojson', 'json']);
1034
+		$files = $this->findFiles(WT_MODULES_DIR . $this->getName() . '/extra', ['csv', 'geojson', 'json']);
1035 1035
 		uasort(
1036 1036
 			$files,
1037 1037
 			function ($a, $b) {
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
 			}
1043 1043
 		);
1044 1044
 
1045
-		return (object)[
1045
+		return (object) [
1046 1046
 			'name' => 'modules/openstreetmap/admin-import-form',
1047 1047
 			'data' => [
1048 1048
 				'title'       => I18N::translate('Import geographic data'),
@@ -1106,8 +1106,8 @@  discard block
 block discarded – undo
1106 1106
 					$row    = explode($delimiter, $input_array[0]);
1107 1107
 					$fields = count($row);
1108 1108
 					if ($fields >= 6 &&
1109
-					    (bool)preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1110
-					    (bool)preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1109
+					    (bool) preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1110
+					    (bool) preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1111 1111
 						$filetype = 'csv';
1112 1112
 					}
1113 1113
 				}
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 							}
1148 1148
 						);
1149 1149
 						// convert separate place fields into a comma separated placename
1150
-						$row[]    = implode(
1150
+						$row[] = implode(
1151 1151
 							Place::GEDCOM_SEPARATOR,
1152 1152
 							array_filter(
1153 1153
 								array_reverse(
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 			}
1164 1164
 
1165 1165
 			if ($filetype !== '?') {
1166
-				if ((bool)$request->get('cleardatabase')) {
1166
+				if ((bool) $request->get('cleardatabase')) {
1167 1167
 					Database::exec("TRUNCATE TABLE `##placelocation`");
1168 1168
 				}
1169 1169
 				//process places
@@ -1174,10 +1174,10 @@  discard block
 block discarded – undo
1174 1174
 				usort(
1175 1175
 					$places,
1176 1176
 					function (array $a, array $b) {
1177
-						if ((int)$a['pl_level'] === (int)$b['pl_level']) {
1177
+						if ((int) $a['pl_level'] === (int) $b['pl_level']) {
1178 1178
 							return I18N::strcasecmp($a['fqpn'], $b['fqpn']);
1179 1179
 						} else {
1180
-							return (int)$a['pl_level'] - (int)$b['pl_level'];
1180
+							return (int) $a['pl_level'] - (int) $b['pl_level'];
1181 1181
 						}
1182 1182
 					}
1183 1183
 				);
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
 						)) {
1198 1198
 
1199 1199
 						// overwrite
1200
-						$location->update((object)$place);
1200
+						$location->update((object) $place);
1201 1201
 						$updated++;
1202 1202
 					} elseif (!$valid && $options !== 'update') {
1203 1203
 						//add
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
 	 */
1268 1268
 	public function postAdminImportPlacesAction(Request $request): RedirectResponse {
1269 1269
 		$gedcomName = $request->get('ged');
1270
-		$inactive   = (int)$request->get('inactive');
1270
+		$inactive   = (int) $request->get('inactive');
1271 1271
 		$tree       = Tree::findByName($gedcomName);
1272 1272
 
1273 1273
 		// Get all the places from the places table ...
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
 				"INSERT INTO `##placelocation` (pl_id, pl_parent_id, pl_level, pl_place)" .
1324 1324
 				" VALUES (:id, :parent, :level, :place)"
1325 1325
 			);
1326
-			$checkRecordQry  = Database::prepare(
1326
+			$checkRecordQry = Database::prepare(
1327 1327
 				"SELECT pl1.pl_id" .
1328 1328
 				" FROM	  `##placelocation` AS pl1" .
1329 1329
 				" LEFT JOIN `##placelocation` AS pl2 ON (pl1.pl_parent_id = pl2.pl_id)" .
@@ -1486,18 +1486,18 @@  discard block
 block discarded – undo
1486 1486
 
1487 1487
 			if ($row['inactive']) {
1488 1488
 				$badge = 'danger';
1489
-			} elseif ((int)$children->no_coord > 0) {
1489
+			} elseif ((int) $children->no_coord > 0) {
1490 1490
 				$badge = 'warning';
1491
-			} elseif ((int)$children->child_count > 0) {
1491
+			} elseif ((int) $children->child_count > 0) {
1492 1492
 				$badge = 'info';
1493 1493
 			} else {
1494 1494
 				$badge = 'secondary';
1495 1495
 			}
1496 1496
 
1497
-			$list[] = (object)array_merge(
1497
+			$list[] = (object) array_merge(
1498 1498
 				$row,
1499 1499
 				[
1500
-					'child_count' => (int)$children->child_count,
1500
+					'child_count' => (int) $children->child_count,
1501 1501
 					'badge'       => $badge,
1502 1502
 				]
1503 1503
 			);
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
 			$row       = $statement->execute(['id' => $id])->fetchOneRow();
1520 1520
 			$fqpn[]    = $row->pl_place;
1521 1521
 			$row->fqpn = implode(Place::GEDCOM_SEPARATOR, $fqpn);
1522
-			$id        = (int)$row->pl_parent_id;
1522
+			$id        = (int) $row->pl_parent_id;
1523 1523
 			$arr[]     = $row;
1524 1524
 		}
1525 1525
 
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
 	 */
1535 1535
 	private function buildLevel($parent_id, $placename, &$places) {
1536 1536
 		$level = array_search('', $placename);
1537
-		$rows  = (array)Database::prepare(
1537
+		$rows  = (array) Database::prepare(
1538 1538
 			"SELECT pl_level, pl_id, pl_place, pl_long, pl_lati, pl_zoom, pl_icon FROM `##placelocation` WHERE pl_parent_id=? ORDER BY pl_place"
1539 1539
 		)
1540 1540
 			->execute([$parent_id])
Please login to merge, or discard this patch.
app/Report/ReportParserGenerate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1604,7 +1604,7 @@
 block discarded – undo
1604 1604
 			$height = (int) $attrs['height'];
1605 1605
 		}
1606 1606
 
1607
-		$person      = Individual::getInstance($id, $this->tree);
1607
+		$person = Individual::getInstance($id, $this->tree);
1608 1608
 		$media_file = $person->findHighlightedMediaFile();
1609 1609
 
1610 1610
 		if ($media_file !== null && $media_file->fileExists()) {
Please login to merge, or discard this patch.
app/Module/OpenStreetMap/Schema/Migration3.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 			" DROP COLUMN sv_long," .
37 37
 			" DROP COLUMN sv_lati," .
38 38
 			" DROP COLUMN sv_bearing," .
39
-			" DROP COLUMN sv_elevation,".
39
+			" DROP COLUMN sv_elevation," .
40 40
 			" DROP COLUMN sv_zoom," .
41 41
 			" DROP INDEX ix1," .
42 42
 			" DROP INDEX ix2," .
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			"DELETE FROM `##module_setting` WHERE module_name='openstreetmap' AND setting_name=''"
57 57
 			];
58 58
 
59
-		foreach($queries as $query) {
59
+		foreach ($queries as $query) {
60 60
 			try {
61 61
 				Database::exec($query);
62 62
 			} catch (PDOException $ex) {
Please login to merge, or discard this patch.
app/Http/Controllers/AdminSiteController.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -255,35 +255,35 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$args = [];
257 257
 		if ($search) {
258
-			$sql            .= " AND log_message LIKE CONCAT('%', :search, '%')";
258
+			$sql .= " AND log_message LIKE CONCAT('%', :search, '%')";
259 259
 			$args['search'] = $search;
260 260
 		}
261 261
 		if ($from) {
262
-			$sql          .= " AND log_time >= :from";
262
+			$sql .= " AND log_time >= :from";
263 263
 			$args['from'] = $from;
264 264
 		}
265 265
 		if ($to) {
266
-			$sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
266
+			$sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
267 267
 			$args['to'] = $to;
268 268
 		}
269 269
 		if ($type) {
270
-			$sql          .= " AND log_type = :type";
270
+			$sql .= " AND log_type = :type";
271 271
 			$args['type'] = $type;
272 272
 		}
273 273
 		if ($text) {
274
-			$sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
274
+			$sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
275 275
 			$args['text'] = $text;
276 276
 		}
277 277
 		if ($ip) {
278
-			$sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
278
+			$sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
279 279
 			$args['ip'] = $ip;
280 280
 		}
281 281
 		if ($username) {
282
-			$sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
282
+			$sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
283 283
 			$args['user'] = $username;
284 284
 		}
285 285
 		if ($gedc) {
286
-			$sql          .= " AND gedcom_name = :gedc";
286
+			$sql .= " AND gedcom_name = :gedc";
287 287
 			$args['gedc'] = $gedc;
288 288
 		}
289 289
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 		}
310 310
 
311 311
 		if ($length) {
312
-			$sql            .= " LIMIT :limit OFFSET :offset";
312
+			$sql .= " LIMIT :limit OFFSET :offset";
313 313
 			$args['limit']  = $length;
314 314
 			$args['offset'] = $start;
315 315
 		}
@@ -361,35 +361,35 @@  discard block
 block discarded – undo
361 361
 
362 362
 		$args = [];
363 363
 		if ($search) {
364
-			$sql            .= " AND log_message LIKE CONCAT('%', :search, '%')";
364
+			$sql .= " AND log_message LIKE CONCAT('%', :search, '%')";
365 365
 			$args['search'] = $search;
366 366
 		}
367 367
 		if ($from) {
368
-			$sql          .= " AND log_time >= :from";
368
+			$sql .= " AND log_time >= :from";
369 369
 			$args['from'] = $from;
370 370
 		}
371 371
 		if ($to) {
372
-			$sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
372
+			$sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
373 373
 			$args['to'] = $to;
374 374
 		}
375 375
 		if ($type) {
376
-			$sql          .= " AND log_type = :type";
376
+			$sql .= " AND log_type = :type";
377 377
 			$args['type'] = $type;
378 378
 		}
379 379
 		if ($text) {
380
-			$sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
380
+			$sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
381 381
 			$args['text'] = $text;
382 382
 		}
383 383
 		if ($ip) {
384
-			$sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
384
+			$sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
385 385
 			$args['ip'] = $ip;
386 386
 		}
387 387
 		if ($username) {
388
-			$sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
388
+			$sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
389 389
 			$args['user'] = $username;
390 390
 		}
391 391
 		if ($gedc) {
392
-			$sql          .= " AND gedcom_name = :gedc";
392
+			$sql .= " AND gedcom_name = :gedc";
393 393
 			$args['gedc'] = $gedc;
394 394
 		}
395 395
 
@@ -421,37 +421,37 @@  discard block
 block discarded – undo
421 421
 
422 422
 		$args = [];
423 423
 		if ($from) {
424
-			$sql          .= " AND log_time >= :from";
424
+			$sql .= " AND log_time >= :from";
425 425
 			$args['from'] = $from;
426 426
 		}
427 427
 		if ($to) {
428
-			$sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
428
+			$sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
429 429
 			$args['to'] = $to;
430 430
 		}
431 431
 		if ($type) {
432
-			$sql          .= " AND log_type = :type";
432
+			$sql .= " AND log_type = :type";
433 433
 			$args['type'] = $type;
434 434
 		}
435 435
 		if ($text) {
436
-			$sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
436
+			$sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
437 437
 			$args['text'] = $text;
438 438
 		}
439 439
 		if ($ip) {
440
-			$sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
440
+			$sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
441 441
 			$args['ip'] = $ip;
442 442
 		}
443 443
 		if ($username) {
444
-			$sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
444
+			$sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
445 445
 			$args['user'] = $username;
446 446
 		}
447 447
 		if ($gedc) {
448
-			$sql          .= " AND gedcom_name = :gedc";
448
+			$sql .= " AND gedcom_name = :gedc";
449 449
 			$args['gedc'] = $gedc;
450 450
 		}
451 451
 
452 452
 		$sql .= " ORDER BY log_id";
453 453
 
454
-		$rows = Database::prepare($sql )->execute($args)->fetchAll();
454
+		$rows = Database::prepare($sql)->execute($args)->fetchAll();
455 455
 
456 456
 		$data = '';
457 457
 
Please login to merge, or discard this patch.
app/Module/SiteMapModule.php 1 patch
Spacing   +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.
app/Module/ClippingsCartModule.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 		// Create a source, to indicate the source of the data.
233 233
 		$filetext .= "0 @WEBTREES@ SOUR\n1 TITL " . WT_BASE_URL . "\n";
234
-		$author   = User::find($tree->getPreference('CONTACT_EMAIL'));
234
+		$author = User::find($tree->getPreference('CONTACT_EMAIL'));
235 235
 		if ($author !== null) {
236 236
 			$filetext .= '1 AUTH ' . $author->getRealName() . "\n";
237 237
 		}
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 
609 609
 		$xref = $request->get('xref');
610 610
 
611
-		$media  = Media::getInstance($xref, $tree);
611
+		$media = Media::getInstance($xref, $tree);
612 612
 
613 613
 		if ($media === null) {
614 614
 			throw new NotFoundHttpException;
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 		/** @var Tree $tree */
650 650
 		$tree = $request->attributes->get('tree');
651 651
 
652
-		$xref   = $request->get('xref');
652
+		$xref = $request->get('xref');
653 653
 
654 654
 		$media = Media::getInstance($xref, $tree);
655 655
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 
674 674
 		$xref = $request->get('xref');
675 675
 
676
-		$note  = Note::getInstance($xref, $tree);
676
+		$note = Note::getInstance($xref, $tree);
677 677
 
678 678
 		if ($note === null) {
679 679
 			throw new NotFoundHttpException;
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 		/** @var Tree $tree */
715 715
 		$tree = $request->attributes->get('tree');
716 716
 
717
-		$xref   = $request->get('xref');
717
+		$xref = $request->get('xref');
718 718
 
719 719
 		$note = Note::getInstance($xref, $tree);
720 720
 
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 
739 739
 		$xref = $request->get('xref');
740 740
 
741
-		$repository  = Repository::getInstance($xref, $tree);
741
+		$repository = Repository::getInstance($xref, $tree);
742 742
 
743 743
 		if ($repository === null) {
744 744
 			throw new NotFoundHttpException;
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 		/** @var Tree $tree */
780 780
 		$tree = $request->attributes->get('tree');
781 781
 
782
-		$xref   = $request->get('xref');
782
+		$xref = $request->get('xref');
783 783
 
784 784
 		$repository = Repository::getInstance($xref, $tree);
785 785
 
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 
804 804
 		$xref = $request->get('xref');
805 805
 
806
-		$source  = Source::getInstance($xref, $tree);
806
+		$source = Source::getInstance($xref, $tree);
807 807
 
808 808
 		if ($source === null) {
809 809
 			throw new NotFoundHttpException;
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
 		$records = array_filter($records);
890 890
 
891 891
 		// Group and sort.
892
-		uasort($records, function(GedcomRecord $x, GedcomRecord $y) {
892
+		uasort($records, function (GedcomRecord $x, GedcomRecord $y) {
893 893
 			return $x::RECORD_TYPE <=> $y::RECORD_TYPE ?: GedcomRecord::compare($x, $y);
894 894
 		});
895 895
 
Please login to merge, or discard this patch.
edit_interface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 					echo view('cards/add-source-citation', [
94 94
 						'level'          => 2,
95 95
 						'full_citations' => $controller->tree()->getPreference('FULL_SOURCES'),
96
-					]);				}
96
+					]); }
97 97
 				if ($level1type !== 'OBJE') {
98 98
 					if ($controller->tree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($controller->tree())) {
99 99
 						echo view('cards/add-media-object', [
Please login to merge, or discard this patch.
resources/views/modules/families/sidebar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 <?php use Fisharebest\Webtrees\Theme; ?>
4 4
 <?php use Fisharebest\Webtrees\View; ?>
5 5
 
6
-<form method="post" action="<?= e(Html::url('module.php' ,['mod' => 'families', 'mod_action' => 'ajax'])) ?>" onsubmit="return false;">
6
+<form method="post" action="<?= e(Html::url('module.php', ['mod' => 'families', 'mod_action' => 'ajax'])) ?>" onsubmit="return false;">
7 7
 	<input type="search" name="sb_fam_name" id="sb_fam_name" placeholder="<?= I18N::translate('Search') ?>">
8 8
 	<p>
9 9
 		<?php foreach ($initials as $letter => $count): ?>
Please login to merge, or discard this patch.
resources/views/modules/individuals/sidebar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 <?php use Fisharebest\Webtrees\Theme; ?>
4 4
 <?php use Fisharebest\Webtrees\View; ?>
5 5
 
6
-<form method="post" action="<?= e(Html::url('module.php' ,['mod' => 'individuals', 'mod_action' => 'ajax'])) ?>" onsubmit="return false;">
6
+<form method="post" action="<?= e(Html::url('module.php', ['mod' => 'individuals', 'mod_action' => 'ajax'])) ?>" onsubmit="return false;">
7 7
 	<input type="search" name="sb_indi_name" id="sb_indi_name" placeholder="<?= I18N::translate('Search') ?>">
8 8
 	<p>
9 9
 		<?php foreach ($initials as $letter => $count): ?>
Please login to merge, or discard this patch.