Completed
Push — 1.7 ( ce7091...0d97cf )
by Greg
14:14 queued 07:41
created
admin_module_reports.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,11 @@
 block discarded – undo
74 74
 				<td class="col-xs-2">
75 75
 					<?php if ($module instanceof ModuleConfigInterface): ?>
76 76
 						<a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a>
77
-					<?php else: ?>
78
-						<?php echo $module->getTitle(); ?>
77
+					<?php else {
78
+    : ?>
79
+						<?php echo $module->getTitle();
80
+}
81
+?>
79 82
 					<?php endif; ?>
80 83
 				</td>
81 84
 				<td class="col-xs-5"><?php echo $module->getDescription(); ?></td>
Please login to merge, or discard this patch.
themes/_custom/theme.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,14 +31,16 @@  discard block
 block discarded – undo
31 31
  * Only the first two functions are required: themeId() and themeName().
32 32
  * The rest are just examples, and should be removed in actual themes.
33 33
  */
34
-class MyTheme extends WebtreesTheme {
34
+class MyTheme extends WebtreesTheme
35
+{
35 36
 	/**
36 37
 	 * Give your theme a unique identifier. Themes beginning with an underscore
37 38
 	 * are reserved for internal use.
38 39
 	 *
39 40
 	 * {@inheritdoc}
40 41
 	 */
41
-	public function themeId() {
42
+	public function themeId()
43
+	{
42 44
 		return '_custom';
43 45
 	}
44 46
 
@@ -51,7 +53,8 @@  discard block
 block discarded – undo
51 53
 	 *
52 54
 	 * {@inheritdoc}
53 55
 	 */
54
-	public function themeName() {
56
+	public function themeName()
57
+	{
55 58
 		return 'Custom theme';
56 59
 	}
57 60
 
@@ -60,7 +63,8 @@  discard block
 block discarded – undo
60 63
 	 *
61 64
 	 * {@inheritdoc}
62 65
 	 */
63
-	public function stylesheets() {
66
+	public function stylesheets()
67
+	{
64 68
 		$css_files   = parent::stylesheets();
65 69
 		// Put a version number in the URL, to prevent browsers from caching old versions.
66 70
 		$css_files[] = WT_BASE_URL . 'themes/_custom/custom-v1.0.css';
@@ -75,7 +79,8 @@  discard block
 block discarded – undo
75 79
 	 *
76 80
 	 * {@inheritdoc}
77 81
 	 */
78
-	public function menuLists($surname) {
82
+	public function menuLists($surname)
83
+	{
79 84
 		// Start with the default "Lists" menu.
80 85
 		$menu = parent::menuLists($surname);
81 86
 		// Remove the "notes" sub-menu.
Please login to merge, or discard this patch.
statisticsplot.php 1 patch
Braces   +30 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@  discard block
 block discarded – undo
36 36
  *
37 37
  * @return int
38 38
  */
39
-function month_of_birth($z_axis, array $z_boundaries, Stats $stats) {
39
+function month_of_birth($z_axis, array $z_boundaries, Stats $stats)
40
+{
40 41
 	$total = 0;
41 42
 
42 43
 	if ($z_axis === 300) {
@@ -92,7 +93,8 @@  discard block
 block discarded – undo
92 93
  *
93 94
  * @return int
94 95
  */
95
-function month_of_birth_of_first_child($z_axis, array $z_boundaries, Stats $stats) {
96
+function month_of_birth_of_first_child($z_axis, array $z_boundaries, Stats $stats)
97
+{
96 98
 	$total = 0;
97 99
 
98 100
 	if ($z_axis === 300) {
@@ -148,7 +150,8 @@  discard block
 block discarded – undo
148 150
  *
149 151
  * @return int
150 152
  */
151
-function month_of_death($z_axis, array $z_boundaries, Stats $stats) {
153
+function month_of_death($z_axis, array $z_boundaries, Stats $stats)
154
+{
152 155
 	$total = 0;
153 156
 
154 157
 	if ($z_axis === 300) {
@@ -204,7 +207,8 @@  discard block
 block discarded – undo
204 207
  *
205 208
  * @return int
206 209
  */
207
-function month_of_marriage($z_axis, array $z_boundaries, Stats $stats) {
210
+function month_of_marriage($z_axis, array $z_boundaries, Stats $stats)
211
+{
208 212
 	$total = 0;
209 213
 
210 214
 	if ($z_axis === 300) {
@@ -245,7 +249,8 @@  discard block
 block discarded – undo
245 249
  *
246 250
  * @return int
247 251
  */
248
-function month_of_first_marriage($z_axis, array $z_boundaries, Stats $stats) {
252
+function month_of_first_marriage($z_axis, array $z_boundaries, Stats $stats)
253
+{
249 254
 	$total = 0;
250 255
 
251 256
 	if ($z_axis === 300) {
@@ -298,7 +303,8 @@  discard block
 block discarded – undo
298 303
  *
299 304
  * @return int
300 305
  */
301
-function lifespan_by_birth_year($z_axis, array $z_boundaries, Stats $stats) {
306
+function lifespan_by_birth_year($z_axis, array $z_boundaries, Stats $stats)
307
+{
302 308
 	$total = 0;
303 309
 
304 310
 	if ($z_axis === 300) {
@@ -350,7 +356,8 @@  discard block
 block discarded – undo
350 356
  *
351 357
  * @return int
352 358
  */
353
-function lifespan_by_death_year($z_axis, array $z_boundaries, Stats $stats) {
359
+function lifespan_by_death_year($z_axis, array $z_boundaries, Stats $stats)
360
+{
354 361
 	$total = 0;
355 362
 
356 363
 	if ($z_axis === 300) {
@@ -402,7 +409,8 @@  discard block
 block discarded – undo
402 409
  *
403 410
  * @return int
404 411
  */
405
-function age_at_marriage($z_axis, array $z_boundaries, Stats $stats) {
412
+function age_at_marriage($z_axis, array $z_boundaries, Stats $stats)
413
+{
406 414
 	$total = 0;
407 415
 
408 416
 	if ($z_axis === 300) {
@@ -456,7 +464,8 @@  discard block
 block discarded – undo
456 464
  *
457 465
  * @return int
458 466
  */
459
-function age_at_first_marriage($z_axis, array $z_boundaries, Stats $stats) {
467
+function age_at_first_marriage($z_axis, array $z_boundaries, Stats $stats)
468
+{
460 469
 	$total = 0;
461 470
 
462 471
 	if ($z_axis === 300) {
@@ -533,7 +542,8 @@  discard block
 block discarded – undo
533 542
  *
534 543
  * @return int
535 544
  */
536
-function number_of_children($z_axis, array $z_boundaries, Stats $stats) {
545
+function number_of_children($z_axis, array $z_boundaries, Stats $stats)
546
+{
537 547
 	$total = 0;
538 548
 
539 549
 	if ($z_axis === 300) {
@@ -575,7 +585,8 @@  discard block
 block discarded – undo
575 585
  * @param int $x
576 586
  * @param int $val
577 587
  */
578
-function fill_y_data($z, $x, $val) {
588
+function fill_y_data($z, $x, $val)
589
+{
579 590
 	global $ydata, $xmax, $x_boundaries, $zmax, $z_boundaries, $xgiven, $zgiven;
580 591
 	//-- calculate index $i out of given z value
581 592
 	//-- calculate index $j out of given x value
@@ -612,7 +623,8 @@  discard block
 block discarded – undo
612 623
  * @param string      $ytitle
613 624
  * @param string[]    $legend
614 625
  */
615
-function my_plot($mytitle, $xdata, $xtitle, $ydata, $ytitle, $legend) {
626
+function my_plot($mytitle, $xdata, $xtitle, $ydata, $ytitle, $legend)
627
+{
616 628
 	global $percentage, $male_female, $ymax, $scalefactor, $datastring, $imgurl;
617 629
 
618 630
 	// Google Chart API only allows text encoding for numbers less than 100
@@ -752,7 +764,8 @@  discard block
 block discarded – undo
752 764
  *
753 765
  * @param string $x_axis_boundaries
754 766
  */
755
-function calculate_axis($x_axis_boundaries) {
767
+function calculate_axis($x_axis_boundaries)
768
+{
756 769
 	global $x_axis, $xdata, $xmax, $x_boundaries;
757 770
 
758 771
 	// Calculate xdata and zdata elements out of chart values
@@ -801,7 +814,8 @@  discard block
 block discarded – undo
801 814
  *
802 815
  * @return string
803 816
  */
804
-function format_range_of_numbers($x, $y) {
817
+function format_range_of_numbers($x, $y)
818
+{
805 819
 	return /* I18N: A range of numbers */ I18N::translate(
806 820
 		'%1$s–%2$s',
807 821
 		I18N::number($x),
@@ -814,7 +828,8 @@  discard block
 block discarded – undo
814 828
  *
815 829
  * @param string $boundaries_z_axis
816 830
  */
817
-function calculate_legend($boundaries_z_axis) {
831
+function calculate_legend($boundaries_z_axis)
832
+{
818 833
 	global $legend, $zmax, $z_boundaries;
819 834
 
820 835
 	// calculate the legend values
Please login to merge, or discard this patch.
admin_trees_check.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -223,7 +223,8 @@  discard block
 block discarded – undo
223 223
  *
224 224
  * @return string
225 225
  */
226
-function link_message($type1, $xref1, $type2, $xref2) {
226
+function link_message($type1, $xref1, $type2, $xref2)
227
+{
227 228
 	return /* I18N: The placeholders are GEDCOM XREFs and tags. e.g. “INDI I123 contains a FAMC link to F234.” */ I18N::translate(
228 229
 		'%1$s %2$s has a %3$s link to %4$s.',
229 230
 		format_type($type1),
@@ -240,7 +241,8 @@  discard block
 block discarded – undo
240 241
  *
241 242
  * @return string
242 243
  */
243
-function format_link($xref) {
244
+function format_link($xref)
245
+{
244 246
 	return '<b><a href="gedrecord.php?pid=' . $xref . '">' . $xref . '</a></b>';
245 247
 }
246 248
 
@@ -251,7 +253,8 @@  discard block
 block discarded – undo
251 253
  *
252 254
  * @return string
253 255
  */
254
-function format_type($type) {
256
+function format_type($type)
257
+{
255 258
 	return '<b title="' . strip_tags(GedcomTag::getLabel($type)) . '">' . $type . '</b>';
256 259
 }
257 260
 
@@ -262,7 +265,8 @@  discard block
 block discarded – undo
262 265
  *
263 266
  * @return string
264 267
  */
265
-function error($message) {
268
+function error($message)
269
+{
266 270
 	global $errors;
267 271
 	$errors = true;
268 272
 
@@ -276,7 +280,8 @@  discard block
 block discarded – undo
276 280
  *
277 281
  * @return string
278 282
  */
279
-function warning($message) {
283
+function warning($message)
284
+{
280 285
 	global $errors;
281 286
 	$errors = true;
282 287
 
Please login to merge, or discard this patch.
admin_trees_manage.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -436,8 +436,11 @@
 block discarded – undo
436 436
 									<i class="fa fa-li fa-star"></i>
437 437
 									<?php if ($tree->getName() == Site::getPreference('DEFAULT_GEDCOM')): ?>
438 438
 										<?php echo I18N::translate('Default family tree'); ?>
439
-									<?php else: ?>
440
-										<a href="#" onclick="document.defaultform<?php echo $tree->getTreeId(); ?>.submit();">
439
+									<?php else {
440
+    : ?>
441
+										<a href="#" onclick="document.defaultform<?php echo $tree->getTreeId();
442
+}
443
+?>.submit();">
441 444
 											<?php echo I18N::translate('Set as default'); ?>
442 445
 											<span class="sr-only">
443 446
 										<?php echo $tree->getTitleHtml(); ?>
Please login to merge, or discard this patch.
message.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,8 @@
 block discarded – undo
208 208
  *
209 209
  * @return bool
210 210
  */
211
-function addMessage($message) {
211
+function addMessage($message)
212
+{
212 213
 	global $WT_TREE;
213 214
 
214 215
 	$success = true;
Please login to merge, or discard this patch.
admin_site_merge.php 1 patch
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -236,9 +236,12 @@  discard block
 block discarded – undo
236 236
 				<?php endforeach; ?>
237 237
 				</tbody>
238 238
 			</table>
239
-			<?php else: ?>
239
+			<?php else {
240
+    : ?>
240 241
 			<p>
241
-				<?php echo I18N::translate('No matching facts found'); ?>
242
+				<?php echo I18N::translate('No matching facts found');
243
+}
244
+?>
242 245
 			</p>
243 246
 			<?php endif; ?>
244 247
 		</div>
@@ -283,9 +286,12 @@  discard block
 block discarded – undo
283 286
 							<?php endforeach; ?>
284 287
 							</tbody>
285 288
 						</table>
286
-					<?php else: ?>
289
+					<?php else {
290
+    : ?>
287 291
 						<p>
288
-							<?php echo I18N::translate('No matching facts found'); ?>
292
+							<?php echo I18N::translate('No matching facts found');
293
+}
294
+?>
289 295
 						</p>
290 296
 					<?php endif; ?>
291 297
 				</div>
@@ -329,9 +335,12 @@  discard block
 block discarded – undo
329 335
 							<?php endforeach; ?>
330 336
 							</tbody>
331 337
 						</table>
332
-					<?php else: ?>
338
+					<?php else {
339
+    : ?>
333 340
 						<p>
334
-							<?php echo I18N::translate('No matching facts found'); ?>
341
+							<?php echo I18N::translate('No matching facts found');
342
+}
343
+?>
335 344
 						</p>
336 345
 					<?php endif; ?>
337 346
 				</div>
@@ -345,10 +354,13 @@  discard block
 block discarded – undo
345 354
 	</button>
346 355
 </form>
347 356
 
348
-<?php else: ?>
357
+<?php else {
358
+    : ?>
349 359
 
350 360
 <form class="form form-horizontal">
351
-	<input type="hidden" name="ged" value="<?php echo $WT_TREE->getNameHtml(); ?>">
361
+	<input type="hidden" name="ged" value="<?php echo $WT_TREE->getNameHtml();
362
+}
363
+?>">
352 364
 	<p><?php echo /* I18N: Records are indviduals, sources, etc. */ I18N::translate('Select two records to merge.'); ?></p>
353 365
 
354 366
 	<div class="form-group">
Please login to merge, or discard this patch.
admin.php 1 patch
Braces   +35 added lines, -14 removed lines patch added patch discarded remove patch
@@ -633,8 +633,11 @@  discard block
 block discarded – undo
633 633
 					<a href="admin_site_upgrade.php" class="error">
634 634
 						<?php echo /* I18N: %s is a version number */ I18N::translate('Upgrade to webtrees %s.', Filter::escapeHtml($latest_version)); ?>
635 635
 					</a>
636
-					<?php else: ?>
637
-						<?php echo I18N::translate('This is the latest version of webtrees. No upgrade is available.'); ?>
636
+					<?php else {
637
+    : ?>
638
+						<?php echo I18N::translate('This is the latest version of webtrees. No upgrade is available.');
639
+}
640
+?>
638 641
 					<?php endif; ?>
639 642
 				</p>
640 643
 				<?php endif; ?>
@@ -796,9 +799,12 @@  discard block
 block discarded – undo
796 799
 									<?php echo I18N::number($changes[$tree->getTreeId()]); ?>
797 800
 									<span class="sr-only"><?php echo I18N::translate('Pending changes'); ?> <?php echo $tree->getTitleHtml(); ?></span>
798 801
 								</a>
799
-								<?php else: ?>
802
+								<?php else {
803
+    : ?>
800 804
 								-
801
-								<?php endif; ?>
805
+								<?php endif;
806
+}
807
+?>
802 808
 							</td>
803 809
 							<td class="text-right flip">
804 810
 								<?php if ($individuals[$tree->getTreeId()]): ?>
@@ -806,9 +812,12 @@  discard block
 block discarded – undo
806 812
 									<?php echo I18N::number($individuals[$tree->getTreeId()]); ?>
807 813
 									<span class="sr-only"><?php echo I18N::translate('Individuals'); ?> <?php echo $tree->getTitleHtml(); ?></span>
808 814
 								</a>
809
-								<?php else: ?>
815
+								<?php else {
816
+    : ?>
810 817
 									-
811
-								<?php endif; ?>
818
+								<?php endif;
819
+}
820
+?>
812 821
 								</td>
813 822
 							<td class="text-right flip">
814 823
 								<?php if ($families[$tree->getTreeId()]): ?>
@@ -816,9 +825,12 @@  discard block
 block discarded – undo
816 825
 									<?php echo I18N::number($families[$tree->getTreeId()]); ?>
817 826
 									<span class="sr-only"><?php echo I18N::translate('Families'); ?> <?php echo $tree->getTitleHtml(); ?></span>
818 827
 								</a>
819
-								<?php else: ?>
828
+								<?php else {
829
+    : ?>
820 830
 								-
821
-								<?php endif; ?>
831
+								<?php endif;
832
+}
833
+?>
822 834
 								</td>
823 835
 							<td class="text-right flip">
824 836
 								<?php if ($sources[$tree->getTreeId()]): ?>
@@ -826,9 +838,12 @@  discard block
 block discarded – undo
826 838
 									<?php echo I18N::number($sources[$tree->getTreeId()]); ?>
827 839
 									<span class="sr-only"><?php echo I18N::translate('Sources'); ?> <?php echo $tree->getTitleHtml(); ?></span>
828 840
 								</a>
829
-								<?php else: ?>
841
+								<?php else {
842
+    : ?>
830 843
 								-
831
-								<?php endif; ?>
844
+								<?php endif;
845
+}
846
+?>
832 847
 							</td>
833 848
 							<td class="text-right flip">
834 849
 								<?php if ($repositories[$tree->getTreeId()]): ?>
@@ -836,9 +851,12 @@  discard block
 block discarded – undo
836 851
 									<?php echo I18N::number($repositories[$tree->getTreeId()]); ?>
837 852
 									<span class="sr-only"><?php echo I18N::translate('Repositories'); ?> <?php echo $tree->getTitleHtml(); ?></span>
838 853
 								</a>
839
-								<?php else: ?>
854
+								<?php else {
855
+    : ?>
840 856
 									-
841
-								<?php endif; ?>
857
+								<?php endif;
858
+}
859
+?>
842 860
 							</td>
843 861
 							<td class="text-right flip">
844 862
 								<?php if ($media[$tree->getTreeId()]): ?>
@@ -846,9 +864,12 @@  discard block
 block discarded – undo
846 864
 									<?php echo I18N::number($media[$tree->getTreeId()]); ?>
847 865
 									<span class="sr-only"><?php echo I18N::translate('Media objects'); ?> <?php echo $tree->getTitleHtml(); ?></span>
848 866
 								</a>
849
-								<?php else: ?>
867
+								<?php else {
868
+    : ?>
850 869
 								-
851
-								<?php endif; ?>
870
+								<?php endif;
871
+}
872
+?>
852 873
 							</td>
853 874
 						</tr>
854 875
 						<?php endforeach; ?>
Please login to merge, or discard this patch.
admin_module_sidebar.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,11 @@
 block discarded – undo
98 98
 				<td class="col-xs-1">
99 99
 					<?php if ($module instanceof ModuleConfigInterface): ?>
100 100
 					<a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a>
101
-					<?php else: ?>
102
-					<?php echo $module->getTitle(); ?>
101
+					<?php else {
102
+    : ?>
103
+					<?php echo $module->getTitle();
104
+}
105
+?>
103 106
 					<?php endif; ?>
104 107
 				</td>
105 108
 				<td class="col-xs-5"><?php echo $module->getDescription(); ?></td>
Please login to merge, or discard this patch.