Completed
Push — openstreetmap ( e1f782 )
by Greg
09:01
created
app/Place.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 	 */
117 117
 	public function getURL() {
118 118
 		 return e(route('place-hierarchy',
119
-			['parent' => array_reverse($this->gedcom_place),'ged' => $this->tree->getNameUrl()]));
119
+			['parent' => array_reverse($this->gedcom_place), 'ged' => $this->tree->getNameUrl()]));
120 120
 	}
121 121
 
122 122
 	/**
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/map.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
 
11 11
 	<?php if (Auth::isAdmin()): ?>
12 12
 		<p class="center">
13
-			<a href="<?= e(route('admin-module',[
13
+			<a href="<?= e(route('admin-module', [
14 14
 				'module' => $module,
15 15
 				'action' => 'AdminConfig',
16 16
 			])) ?>">
17 17
 				<?= I18N::translate('Map module preferences') ?>
18 18
 			</a>
19 19
 			|
20
-			<a href="<?= e(route('admin-module',[
20
+			<a href="<?= e(route('admin-module', [
21 21
 				'module' => $module,
22 22
 				'action' => 'AdminPlaces',
23 23
 			])) ?>">
Please login to merge, or discard this patch.
app/FactLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * You should have received a copy of the GNU General Public License
14 14
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
  */
16
-declare(strict_types = 1);
16
+declare(strict_types=1);
17 17
 
18 18
 namespace Fisharebest\Webtrees;
19 19
 
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/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.
app/Http/Controllers/PlaceHierarchyController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 		$osm_module = Module::getModuleByName(self::MAP_MODULE);
48 48
 		$method     = 'assets';
49 49
 		$showmap    = $osm_module &&
50
-			(bool)$osm_module->getPreference('place_hierarchy') &&
50
+			(bool) $osm_module->getPreference('place_hierarchy') &&
51 51
 			method_exists($osm_module, $method) &&
52 52
 			strpos($action, 'hierarchy') === 0;
53 53
 		$data       = null;
54 54
 		$note       = false;
55 55
 
56 56
 		if ($showmap) {
57
-			$note    = true;
57
+			$note = true;
58 58
 			$content .= view('modules/openstreetmap/map',
59 59
 				[
60 60
 					'assets' => $osm_module->$method(),
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
 
68 68
 		switch ($action) {
69 69
 			case 'list':
70
-				$nextaction      = ['hierarchy' => I18N::translate('Show place hierarchy')];
71
-				$content         .= view('place-list', $this->getList($tree));
70
+				$nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')];
71
+				$content .= view('place-list', $this->getList($tree));
72 72
 				break;
73 73
 			case 'hierarchy':
74 74
 			case 'hierarchy-e':
75 75
 				$nextaction      = ['list' => I18N::translate('List all places')];
76 76
 				$data            = $this->getHierarchy($tree, $place, $parent);
77
-				$content         .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
77
+				$content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
78 78
 				if (null === $data || $action === 'hierarchy-e') {
79 79
 					$content .= view('place-events', $this->getEvents($tree, $place));
80 80
 				}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 		return
116 116
 			[
117
-				'columns' => array_chunk($list_places, (int)ceil($numfound / $divisor)),
117
+				'columns' => array_chunk($list_places, (int) ceil($numfound / $divisor)),
118 118
 			];
119 119
 	}
120 120
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 				[
137 137
 					'tree'      => $tree,
138 138
 					'col_class' => "w-" . ($divisor === 2 ? "25" : "50"),
139
-					'columns'   => array_chunk($child_places, (int)ceil($numfound / $divisor)),
139
+					'columns'   => array_chunk($child_places, (int) ceil($numfound / $divisor)),
140 140
 					'place'     => $place,
141 141
 					'parent'    => $parent,
142 142
 				];
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/admin-import-form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 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',[
9
+    e(route('admin-module', [
10 10
         'module' => $module,
11 11
         'action' => 'AdminImport',
12 12
     ])) ?>">
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 				</div>
30 30
 				<select id="serverfile" name="serverfile" class="form-control">
31 31
                     <option class='custom-select' selected disabled value=''><?= I18N::translate('choose a file&hellip;') ?></option>
32
-                    <?php foreach($files as $file): ?>
32
+                    <?php foreach ($files as $file): ?>
33 33
                         <option value="<?= e($file) ?>"><?= $file ?></option>
34 34
                     <?php endforeach ?>
35 35
 				</select>
Please login to merge, or discard this patch.
resources/views/modules/openstreetmap/admin-places.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,12 +67,10 @@  discard block
 block discarded – undo
67 67
                 </a>
68 68
             </td>
69 69
 			<td>
70
-				<?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') :
71
-                    strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
70
+				<?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?>
72 71
 			</td>
73 72
 			<td>
74
-				<?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') :
75
-                    strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
73
+				<?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?>
76 74
 			</td>
77 75
 			<td>
78 76
 				<?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?>
@@ -194,7 +192,7 @@  discard block
 block discarded – undo
194 192
 	</tfoot>
195 193
 </table>
196 194
 
197
-<form method="POST" action="<?= e(route('admin-module',[
195
+<form method="POST" action="<?= e(route('admin-module', [
198 196
 		'module' => $module,
199 197
 		'action' => 'AdminImportPlaces'
200 198
 	])) ?>">
Please login to merge, or discard this patch.
app/Location.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * You should have received a copy of the GNU General Public License
14 14
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
  */
16
-declare(strict_types = 1);
16
+declare(strict_types=1);
17 17
 
18 18
 namespace Fisharebest\Webtrees;
19 19
 
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 	 * @param array $record
31 31
 	 * @throws \Exception
32 32
 	 */
33
-	public function __construct($gedcomName, $record=[]) {
33
+	public function __construct($gedcomName, $record = []) {
34 34
 		$tmp = $this->getRecordFromName($gedcomName);
35 35
 		if ($tmp !== null) {
36 36
 			$this->record = $tmp;
37 37
 		} elseif (!empty($record)) {
38
-			$this->record = (object)$record;
38
+			$this->record = (object) $record;
39 39
 		} else {
40
-			$this->record = (object)[
40
+			$this->record = (object) [
41 41
 				'fqpn'         => '',
42 42
 				'pl_id'        => 0,
43 43
 				'pl_parent_id' => 0,
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
 		switch ($format) {
68 68
 			case 'signed':
69 69
 				return $this->record->pl_lati ?
70
-					(float)strtr($this->record->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) :
71
-					$this->record->pl_lati;
70
+					(float) strtr($this->record->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) : $this->record->pl_lati;
72 71
 			default:
73 72
 				return $this->record->pl_lati;
74 73
 		}
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 		switch ($format) {
84 83
 			case 'signed':
85 84
 				return $this->record->pl_long ?
86
-					(float)strtr($this->record->pl_long, ['E' => '', 'W' => '-', ',' => '.']) :
87
-					$this->record->pl_long;
85
+					(float) strtr($this->record->pl_long, ['E' => '', 'W' => '-', ',' => '.']) : $this->record->pl_long;
88 86
 			default:
89 87
 				return $this->record->pl_long;
90 88
 		}
Please login to merge, or discard this patch.
app/Module/OpenStreetmapModule.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 */
207 207
 	public function getBaseDataAction(Request $request) {
208 208
 		$provider = $this->getMapProviderData($request);
209
-		$style    = $provider['selectedStyleName']    = '' ? '' : '.' . $provider['selectedStyleName'];
209
+		$style    = $provider['selectedStyleName'] = '' ? '' : '.' . $provider['selectedStyleName'];
210 210
 
211 211
 		switch ($provider['selectedProvIndex']) {
212 212
 			case 'mapbox':
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 						$color            = self::LINE_COLORS[log($id, 2) % $color_count];
294 294
 						$icon['color']    = $color; //make icon color the same as the line
295 295
 						$sosa_points[$id] = $event->getLatLonJSArray();
296
-						$sosa_parent      = (int)floor($id / 2);
296
+						$sosa_parent      = (int) floor($id / 2);
297 297
 						if (array_key_exists($sosa_parent, $sosa_points)) {
298 298
 							// Would like to use a GeometryCollection to hold LineStrings
299 299
 							// rather than generate polylines but the MarkerCluster library
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 								'modules/openstreetmap/event-sidebar',
326 326
 								$event->shortSummary($mapType, $id)
327 327
 							),
328
-							'zoom' => (int)$event->getZoom(),
328
+							'zoom' => (int) $event->getZoom(),
329 329
 						],
330 330
 					];
331 331
 				}
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 							'stats'    => $placeStats,
396 396
 						]
397 397
 					),
398
-					'zoom' => (int)($location->getZoom() ?? 2),
398
+					'zoom' => (int) ($location->getZoom() ?? 2),
399 399
 				],
400 400
 			];
401 401
 		}
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		$xref        = $request->get('reference');
448 448
 		$tree        = $request->attributes->get('tree');
449 449
 		$individual  = Individual::getInstance($xref, $tree);
450
-		$generations = (int)$request->get(
450
+		$generations = (int) $request->get(
451 451
 			'generations',
452 452
 			$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS')
453 453
 		);
@@ -496,14 +496,14 @@  discard block
 block discarded – undo
496 496
 						function ($item) {
497 497
 							return preg_replace('/[^a-z\d]/i', '', strtolower($item));
498 498
 						},
499
-						(array)$provider->styles
499
+						(array) $provider->styles
500 500
 					);
501 501
 
502
-					$key = preg_replace('/[^a-z\d]/i', '', strtolower((string)$provider->name));
502
+					$key = preg_replace('/[^a-z\d]/i', '', strtolower((string) $provider->name));
503 503
 
504 504
 					self::$map_providers[$key] = [
505
-						'name'   => (string)$provider->name,
506
-						'styles' => array_combine($style_keys, (array)$provider->styles),
505
+						'name'   => (string) $provider->name,
506
+						'styles' => array_combine($style_keys, (array) $provider->styles),
507 507
 					];
508 508
 				}
509 509
 			} catch (\Exception $ex) {
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		$maxgenerations = $tree->getPreference('MAX_PEDIGREE_GENERATIONS');
566 566
 		$generations    = $request->get('generations', $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
567 567
 
568
-		return (object)[
568
+		return (object) [
569 569
 			'name' => 'modules/openstreetmap/pedigreemap',
570 570
 			'data' => [
571 571
 				'assets' => $this->assets(),
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 	 * @return object
629 629
 	 */
630 630
 	public function getAdminConfigAction(Request $request) {
631
-		return (object)[
631
+		return (object) [
632 632
 			'name' => 'modules/openstreetmap/admin-config',
633 633
 			'data' => [
634 634
 				'title'        => I18N::translate('Open Street Maps (Configuration)'),
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
 	 * @throws \Exception
685 685
 	 */
686 686
 	public function getAdminPlacesAction(Request $request) {
687
-		$parent_id   = (int)$request->get('parent_id', 0);
688
-		$inactive    = (bool)$request->get('inactive');
687
+		$parent_id   = (int) $request->get('parent_id', 0);
688
+		$inactive    = (bool) $request->get('inactive');
689 689
 		$hierarchy   = $this->gethierarchy($parent_id);
690 690
 		$title       = I18N::translate('Open Street Maps (Geographic data)');
691 691
 		$breadcrumbs = [
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 		}
709 709
 		$breadcrumbs[] = array_pop($breadcrumbs);
710 710
 
711
-		return (object)[
711
+		return (object) [
712 712
 			'name' => 'modules/openstreetmap/admin-places',
713 713
 			'data' => [
714 714
 				'title'       => $title,
@@ -729,9 +729,9 @@  discard block
 block discarded – undo
729 729
 	 * @throws \Exception
730 730
 	 */
731 731
 	public function getAdminPlaceEditAction(Request $request) {
732
-		$parent_id = (int)$request->get('parent_id', 0);
733
-		$place_id  = (int)$request->get('place_id');
734
-		$inactive  = (int)$request->get('inactive');
732
+		$parent_id = (int) $request->get('parent_id', 0);
733
+		$place_id  = (int) $request->get('place_id');
734
+		$inactive  = (int) $request->get('inactive');
735 735
 		$hierarchy = $this->gethierarchy($place_id);
736 736
 		$fqpn      = empty($hierarchy) ? '' : $hierarchy[0]->fqpn;
737 737
 		$location  = new Location($fqpn);
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 		}
768 768
 		$breadcrumbs[] = $place_id === 0 ? I18N::translate('Add') : I18N::translate('Edit');
769 769
 
770
-		return (object)[
770
+		return (object) [
771 771
 			'name' => 'modules/openstreetmap/admin-place-edit',
772 772
 			'data' => [
773 773
 				'module'      => $this->getName(),
@@ -793,9 +793,9 @@  discard block
 block discarded – undo
793 793
 	 */
794 794
 	public function postAdminSaveAction(Request $request) {
795 795
 		if (Filter::checkCsrf()) {
796
-			$parent_id = (int)$request->get('parent_id');
797
-			$place_id  = (int)$request->get('place_id');
798
-			$inactive  = (int)$request->get('inactive');
796
+			$parent_id = (int) $request->get('parent_id');
797
+			$place_id  = (int) $request->get('place_id');
798
+			$inactive  = (int) $request->get('inactive');
799 799
 			$lat       = round($request->get('new_place_lati'), 5); // 5 decimal places (locate to within about 1 metre)
800 800
 			$lat       = ($lat < 0 ? 'S' : 'N') . abs($lat);
801 801
 			$lng       = round($request->get('new_place_long'), 5);
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 						  VALUES (:id, :parent, :level, :place, :lng, :lat, :zoom, :icon)"
815 815
 				)->execute(
816 816
 					[
817
-					'id'     => (int)Database::prepare("SELECT MAX(pl_id)+1 FROM `##placelocation`")->fetchOne(),
817
+					'id'     => (int) Database::prepare("SELECT MAX(pl_id)+1 FROM `##placelocation`")->fetchOne(),
818 818
 					'parent' => $parent_id,
819 819
 					'level'  => $level,
820 820
 					'place'  => $request->get('new_place_name'),
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 					'place' => $request->get('new_place_name'),
834 834
 					'lat'   => $request->get('lati_control') . $lat,
835 835
 					'lng'   => $request->get('long_control') . $lng,
836
-					'zoom'  => (int)$request->get('new_zoom_factor'),
836
+					'zoom'  => (int) $request->get('new_zoom_factor'),
837 837
 					'icon'  => $icon,
838 838
 				]
839 839
 				);
@@ -866,9 +866,9 @@  discard block
 block discarded – undo
866 866
 	 */
867 867
 	public function postAdminDeleteRecordAction(Request $request): RedirectResponse {
868 868
 		if (Filter::checkCsrf()) {
869
-			$place_id  = (int)$request->get('place_id');
870
-			$parent_id = (int)$request->get('parent_id');
871
-			$inactive  = (int)$request->get('inactive');
869
+			$place_id  = (int) $request->get('place_id');
870
+			$parent_id = (int) $request->get('parent_id');
871
+			$inactive  = (int) $request->get('inactive');
872 872
 
873 873
 			try {
874 874
 				Database::prepare(
@@ -887,7 +887,7 @@  discard block
 block discarded – undo
887 887
 				);
888 888
 			}
889 889
 			// If after deleting there are no more places at this level then go up a level
890
-			$children = (int)Database::prepare(
890
+			$children = (int) Database::prepare(
891 891
 				"SELECT COUNT(pl_id) FROM `##placelocation` WHERE pl_parent_id = :parent_id"
892 892
 			)
893 893
 				->execute(['parent_id' => $parent_id])
@@ -920,9 +920,9 @@  discard block
 block discarded – undo
920 920
 	 * @throws \Exception
921 921
 	 */
922 922
 	public function getAdminExportAction(Request $request) {
923
-		$parent_id = (int)$request->get('parent_id');
923
+		$parent_id = (int) $request->get('parent_id');
924 924
 		$format    = $request->get('format', 'csv');
925
-		$maxlevel  = (int)Database::prepare("SELECT max(pl_level) FROM `##placelocation`")->execute()->fetchOne();
925
+		$maxlevel  = (int) Database::prepare("SELECT max(pl_level) FROM `##placelocation`")->execute()->fetchOne();
926 926
 		$startfqpn = [];
927 927
 		$hierarchy = $this->gethierarchy($parent_id);
928 928
 		$geojson   = [];
@@ -974,8 +974,8 @@  discard block
 block discarded – undo
974 974
 							)
975 975
 						)
976 976
 					);
977
-					$long = (float)strtr($place['pl_long'], ['E' => '', 'W' => '-', ',' => '.']);
978
-					$lati = (float)strtr($place['pl_lati'], ['N' => '', 'S' => '-', ',' => '.']);
977
+					$long = (float) strtr($place['pl_long'], ['E' => '', 'W' => '-', ',' => '.']);
978
+					$lati = (float) strtr($place['pl_lati'], ['N' => '', 'S' => '-', ',' => '.']);
979 979
 
980 980
 					$geojson['features'][] = [
981 981
 						'type'     => 'Feature',
@@ -1007,8 +1007,8 @@  discard block
 block discarded – undo
1007 1007
 	}
1008 1008
 
1009 1009
 	public function getAdminImportFormAction(Request $request) {
1010
-		$parent_id   = (int)$request->get('parent_id');
1011
-		$inactive    = (int)$request->get('inactive');
1010
+		$parent_id   = (int) $request->get('parent_id');
1011
+		$inactive    = (int) $request->get('inactive');
1012 1012
 		$breadcrumbs = [
1013 1013
 			route('admin-control-panel') => I18N::translate('Control panel'),
1014 1014
 			route('admin-modules')       => I18N::translate('Module administration'),
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
 			}
1035 1035
 		);
1036 1036
 
1037
-		return (object)[
1037
+		return (object) [
1038 1038
 			'name' => 'modules/openstreetmap/admin-import-form',
1039 1039
 			'data' => [
1040 1040
 				'title'       => I18N::translate('Import geographic data'),
@@ -1098,8 +1098,8 @@  discard block
 block discarded – undo
1098 1098
 					$row    = explode($delimiter, $input_array[0]);
1099 1099
 					$fields = count($row);
1100 1100
 					if ($fields >= 6 &&
1101
-						(bool)preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1102
-						(bool)preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1101
+						(bool) preg_match("/[SN][0-9]*\.?[0-9]*/", $row[$fields - 3]) &&
1102
+						(bool) preg_match("/[EW][0-9]*\.?[0-9]*/", $row[$fields - 4])) {
1103 1103
 						$filetype = 'csv';
1104 1104
 					}
1105 1105
 				}
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 			}
1156 1156
 
1157 1157
 			if ($filetype !== '?') {
1158
-				if ((bool)$request->get('cleardatabase')) {
1158
+				if ((bool) $request->get('cleardatabase')) {
1159 1159
 					Database::exec("TRUNCATE TABLE `##placelocation`");
1160 1160
 				}
1161 1161
 				//process places
@@ -1166,10 +1166,10 @@  discard block
 block discarded – undo
1166 1166
 				usort(
1167 1167
 					$places,
1168 1168
 					function (array $a, array $b) {
1169
-						if ((int)$a['pl_level'] === (int)$b['pl_level']) {
1169
+						if ((int) $a['pl_level'] === (int) $b['pl_level']) {
1170 1170
 							return I18N::strcasecmp($a['fqpn'], $b['fqpn']);
1171 1171
 						} else {
1172
-							return (int)$a['pl_level'] - (int)$b['pl_level'];
1172
+							return (int) $a['pl_level'] - (int) $b['pl_level'];
1173 1173
 						}
1174 1174
 					}
1175 1175
 				);
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 						)) {
1190 1190
 
1191 1191
 						// overwrite
1192
-						$location->update((object)$place);
1192
+						$location->update((object) $place);
1193 1193
 						$updated++;
1194 1194
 					} elseif (!$valid && $options !== 'update') {
1195 1195
 						//add
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
 	 */
1260 1260
 	public function postAdminImportPlacesAction(Request $request) {
1261 1261
 		$gedcomName = $request->get('ged');
1262
-		$inactive   = (int)$request->get('inactive');
1262
+		$inactive   = (int) $request->get('inactive');
1263 1263
 		$tree       = Tree::findByName($gedcomName);
1264 1264
 
1265 1265
 		// Get all the places from the places table ...
@@ -1478,7 +1478,7 @@  discard block
 block discarded – undo
1478 1478
 		$list = [];
1479 1479
 		/** @var array $rows */
1480 1480
 		foreach ($rows as $row) {
1481
-			if ((bool)$row['inactive'] && !$show_inactive) {
1481
+			if ((bool) $row['inactive'] && !$show_inactive) {
1482 1482
 				continue;
1483 1483
 			}
1484 1484
 
@@ -1489,20 +1489,20 @@  discard block
 block discarded – undo
1489 1489
 				]
1490 1490
 			)->fetchOneRow();
1491 1491
 
1492
-			if ((bool)$row['inactive']) {
1492
+			if ((bool) $row['inactive']) {
1493 1493
 				$badge = 'danger';
1494
-			} elseif ((int)$children->no_coord > 0) {
1494
+			} elseif ((int) $children->no_coord > 0) {
1495 1495
 				$badge = 'warning';
1496
-			} elseif ((int)$children->child_count > 0) {
1496
+			} elseif ((int) $children->child_count > 0) {
1497 1497
 				$badge = 'info';
1498 1498
 			} else {
1499 1499
 				$badge = 'secondary';
1500 1500
 			}
1501 1501
 
1502
-			$list[] = (object)array_merge(
1502
+			$list[] = (object) array_merge(
1503 1503
 				$row,
1504 1504
 				[
1505
-					'child_count' => (int)$children->child_count,
1505
+					'child_count' => (int) $children->child_count,
1506 1506
 					'badge'       => $badge,
1507 1507
 				]
1508 1508
 			);
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
 			$row       = $statement->execute(['id' => $id])->fetchOneRow();
1525 1525
 			$fqpn[]    = $row->pl_place;
1526 1526
 			$row->fqpn = implode(Place::GEDCOM_SEPARATOR, $fqpn);
1527
-			$id        = (int)$row->pl_parent_id;
1527
+			$id        = (int) $row->pl_parent_id;
1528 1528
 			$arr[]     = $row;
1529 1529
 		}
1530 1530
 
@@ -1539,7 +1539,7 @@  discard block
 block discarded – undo
1539 1539
 	 */
1540 1540
 	private function buildLevel($parent_id, $placename, &$places) {
1541 1541
 		$level = array_search('', $placename);
1542
-		$rows  = (array)Database::prepare(
1542
+		$rows  = (array) Database::prepare(
1543 1543
 			"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"
1544 1544
 		)
1545 1545
 			->execute([$parent_id])
Please login to merge, or discard this patch.