Completed
Push — openstreetmap ( 8ce70d...10d5a2 )
by Greg
07:41
created
app/Http/Controllers/HourglassChartController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		$maximum_generations = (int) $tree->getPreference('MAX_DESCENDANCY_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
59 59
 		$default_generations = (int) $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
60 60
 
61
-		$generations  = (int) $request->get('generations', $default_generations);
61
+		$generations = (int) $request->get('generations', $default_generations);
62 62
 
63 63
 		$generations = min($generations, $maximum_generations);
64 64
 		$generations = max($generations, self::MINIMUM_GENERATIONS);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 				echo '<table cellspacing="0" cellpadding="0" border="0" style="position: relative; top: auto; float: ' . $tablealign . ';">';
221 221
 				for ($i = 0; $i < $ct; $i++) {
222 222
 					$individual2 = $children[$i];
223
-					$chil    = $individual2->getXref();
223
+					$chil = $individual2->getXref();
224 224
 					echo '<tr>';
225 225
 					echo '<td id="td_', e($chil), '" class="', I18N::direction(), '" style="text-align:', $otablealign, '">';
226 226
 					$this->printDescendency($individual2, $generation + 1, $generations, $show_spouse, false);
Please login to merge, or discard this patch.
app/Http/Controllers/HelpTextController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,18 +116,18 @@
 block discarded – undo
116 116
 		];
117 117
 
118 118
 		const DMY_SHORTCUTS = [
119
-			'11 DEC 1913' => ['11/12/1913', '11-12-1913', '11.12.1913',],
120
-			'01 FEB 2003' => ['01/02/03', '01-02-03', '01.02.03',],
119
+			'11 DEC 1913' => ['11/12/1913', '11-12-1913', '11.12.1913', ],
120
+			'01 FEB 2003' => ['01/02/03', '01-02-03', '01.02.03', ],
121 121
 		];
122 122
 
123 123
 		const MDY_SHORTCUTS = [
124
-			'11 DEC 1913' => ['12/11/1913', '12-11-1913', '12.11.1913',],
125
-			'01 FEB 2003' => ['02/01/03', '02-01-03', '02.01.03',],
124
+			'11 DEC 1913' => ['12/11/1913', '12-11-1913', '12.11.1913', ],
125
+			'01 FEB 2003' => ['02/01/03', '02-01-03', '02.01.03', ],
126 126
 		];
127 127
 
128 128
 		const YMD_SHORTCUTS = [
129
-			'11 DEC 1913' => ['11/12/1913', '11-12-1913', '11.12.1913',],
130
-			'01 FEB 2003' => ['03/02/01', '03-02-01', '03.02.01',],
129
+			'11 DEC 1913' => ['11/12/1913', '11-12-1913', '11.12.1913', ],
130
+			'01 FEB 2003' => ['03/02/01', '03-02-01', '03.02.01', ],
131 131
 		];
132 132
 
133 133
 		/**
Please login to merge, or discard this patch.
app/Http/Controllers/RelationshipsChartController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		$recursion = (int) $request->get('recursion', '0');
106 106
 		$ancestors = (bool) $request->get('ancestors', '0');
107 107
 
108
-		$max_recursion  = (int) $tree->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION);
108
+		$max_recursion = (int) $tree->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION);
109 109
 
110 110
 		$recursion = min($recursion, $max_recursion);
111 111
 
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
 							case 'sis':
154 154
 							case 'sib':
155 155
 								$table[$x + 1][$y] = '<div style="background:url(' . Theme::theme()->parameter('image-hline') . ') repeat-x center;  width: 94px; text-align: center"><div class="hline-text" style="height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . FontAwesome::decorativeIcon('arrow-end') . '</div></div>';
156
-								$x                 += 2;
156
+								$x += 2;
157 157
 								break;
158 158
 							case 'son':
159 159
 							case 'dau':
160 160
 							case 'chi':
161 161
 								if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) {
162 162
 									$table[$x + 1][$y - 1] = '<div style="background:url(' . $diagonal2 . '); width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: end;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>';
163
-									$x                     += 2;
163
+									$x += 2;
164 164
 								} else {
165 165
 									$table[$x][$y - 1] = '<div style="background:url(' . Theme::theme()
166 166
 											->parameter('image-vline') . ') repeat-y center; height: 64px; text-align: center;"><div class="vline-text" style="display: inline-block; width:50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>';
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 							case 'par':
173 173
 								if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) {
174 174
 									$table[$x + 1][$y + 1] = '<div style="background:url(' . $diagonal1 . '); background-position: top right; width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: start;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>';
175
-									$x                     += 2;
175
+									$x += 2;
176 176
 								} else {
177 177
 									$table[$x][$y + 1] = '<div style="background:url(' . Theme::theme()
178 178
 											->parameter('image-vline') . ') repeat-y center; height: 64px; text-align:center; "><div class="vline-text" style="display: inline-block; width: 50%; line-height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . FontAwesome::decorativeIcon('arrow-up') . '</div></div>';
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.
resources/views/modules/openstreetmap/admin-places.php 2 patches
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.
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.
resources/views/media-page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@
 block discarded – undo
10 10
 
11 11
 <?php if ($media->isPendingDeletion()): ?>
12 12
 	<?php if (Auth::isModerator($media->getTree())): ?>
13
-		<?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This media object 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($media->getXref()) . '\', \'' . e($media->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($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
13
+		<?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object 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($media->getXref()) . '\', \'' . e($media->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($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
14 14
 	<?php elseif (Auth::isEditor($media->getTree())): ?>
15 15
 		<?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
16 16
 	<?php endif ?>
17 17
 <?php elseif ($media->isPendingAddition()): ?>
18 18
 	<?php if (Auth::isModerator($media->getTree())): ?>
19
-		<?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This media object 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($media->getXref()) . '\', \'' . e($media->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($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>' ) . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
19
+		<?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object 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($media->getXref()) . '\', \'' . e($media->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($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
20 20
 	<?php elseif (Auth::isEditor($media->getTree())): ?>
21 21
 		<?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?>
22 22
 	<?php endif ?>
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/Http/Controllers/PlaceHierarchyController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 		$osm_module = Module::getModuleByName(self::MAP_MODULE);
51 51
 		$method     = 'assets';
52 52
 		$showmap    = $osm_module &&
53
-			(bool)$osm_module->getPreference('place_hierarchy') &&
53
+			(bool) $osm_module->getPreference('place_hierarchy') &&
54 54
 			method_exists($osm_module, $method) &&
55 55
 			strpos($action, 'hierarchy') === 0;
56 56
 		$data       = null;
57 57
 		$note       = false;
58 58
 
59 59
 		if ($showmap) {
60
-			$note    = true;
60
+			$note = true;
61 61
 			$content .= view('modules/openstreetmap/map',
62 62
 				[
63 63
 					'assets' => $osm_module->$method(),
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 
71 71
 		switch ($action) {
72 72
 			case 'list':
73
-				$nextaction      = ['hierarchy' => I18N::translate('Show place hierarchy')];
74
-				$content         .= view('place-list', $this->getList($tree));
73
+				$nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')];
74
+				$content .= view('place-list', $this->getList($tree));
75 75
 				break;
76 76
 			case 'hierarchy':
77 77
 			case 'hierarchy-e':
78 78
 				$nextaction      = ['list' => I18N::translate('Show all places in a list')];
79 79
 				$data            = $this->getHierarchy($tree, $place, $parent);
80
-				$content         .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
80
+				$content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data);
81 81
 				if (null === $data || $action === 'hierarchy-e') {
82 82
 					$content .= view('place-events', $this->getEvents($tree, $place));
83 83
 				}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		return
119 119
 			[
120
-				'columns' => array_chunk($list_places, (int)ceil($numfound / $divisor)),
120
+				'columns' => array_chunk($list_places, (int) ceil($numfound / $divisor)),
121 121
 			];
122 122
 	}
123 123
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 				[
140 140
 					'tree'      => $tree,
141 141
 					'col_class' => "w-" . ($divisor === 2 ? "25" : "50"),
142
-					'columns'   => array_chunk($child_places, (int)ceil($numfound / $divisor)),
142
+					'columns'   => array_chunk($child_places, (int) ceil($numfound / $divisor)),
143 143
 					'place'     => $place,
144 144
 					'parent'    => $parent,
145 145
 				];
Please login to merge, or discard this patch.