Completed
Push — 1.7 ( 5dea34...6cf9f6 )
by
unknown
08:46
created
app/Date/CalendarDate.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -842,7 +842,7 @@
 block discarded – undo
842 842
 	/**
843 843
 	 * Which months follows this one? Calendars with leap-months should provide their own implementation.
844 844
 	 *
845
-	 * @return int[]
845
+	 * @return integer[]
846 846
 	 */
847 847
 	protected function nextMonth() {
848 848
 		return array($this->m === $this->calendar->monthsInYear() ? $this->nextYear($this->y) : $this->y, ($this->m % $this->calendar->monthsInYear()) + 1);
Please login to merge, or discard this patch.
Switch Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -491,20 +491,20 @@  discard block
 block discarded – undo
491 491
 	 */
492 492
 	public function convertToCalendar($calendar) {
493 493
 		switch ($calendar) {
494
-		case 'gregorian':
495
-			return new GregorianDate($this);
496
-		case 'julian':
497
-			return new JulianDate($this);
498
-		case 'jewish':
499
-			return new JewishDate($this);
500
-		case 'french':
501
-			return new FrenchDate($this);
502
-		case 'hijri':
503
-			return new HijriDate($this);
504
-		case 'jalali':
505
-			return new JalaliDate($this);
506
-		default:
507
-			return $this;
494
+			case 'gregorian':
495
+				return new GregorianDate($this);
496
+			case 'julian':
497
+				return new JulianDate($this);
498
+			case 'jewish':
499
+				return new JewishDate($this);
500
+			case 'french':
501
+				return new FrenchDate($this);
502
+			case 'hijri':
503
+				return new HijriDate($this);
504
+			case 'jalali':
505
+				return new JalaliDate($this);
506
+			default:
507
+				return $this;
508 508
 		}
509 509
 	}
510 510
 
@@ -581,90 +581,90 @@  discard block
 block discarded – undo
581 581
 			$case = 'GENITIVE';
582 582
 		} else {
583 583
 			switch ($qualifier) {
584
-			case 'TO':
585
-			case 'ABT':
586
-			case 'FROM':
587
-				$case = 'GENITIVE';
588
-				break;
589
-			case 'AFT':
590
-				$case = 'LOCATIVE';
591
-				break;
592
-			case 'BEF':
593
-			case 'BET':
594
-			case 'AND':
595
-				$case = 'INSTRUMENTAL';
596
-				break;
597
-			case '':
598
-			case 'INT':
599
-			case 'EST':
600
-			case 'CAL':
601
-			default: // There shouldn't be any other options...
602
-				$case = 'NOMINATIVE';
603
-				break;
584
+				case 'TO':
585
+				case 'ABT':
586
+				case 'FROM':
587
+					$case = 'GENITIVE';
588
+					break;
589
+				case 'AFT':
590
+					$case = 'LOCATIVE';
591
+					break;
592
+				case 'BEF':
593
+				case 'BET':
594
+				case 'AND':
595
+					$case = 'INSTRUMENTAL';
596
+					break;
597
+				case '':
598
+				case 'INT':
599
+				case 'EST':
600
+				case 'CAL':
601
+				default: // There shouldn't be any other options...
602
+					$case = 'NOMINATIVE';
603
+					break;
604 604
 			}
605 605
 		}
606 606
 		// Build up the formatted date, character at a time
607 607
 		preg_match_all('/%[^%]/', $format, $matches);
608 608
 		foreach ($matches[0] as $match) {
609 609
 			switch ($match) {
610
-			case '%d':
611
-				$format = str_replace($match, $this->formatDayZeros(), $format);
612
-				break;
613
-			case '%j':
614
-				$format = str_replace($match, $this->formatDay(), $format);
615
-				break;
616
-			case '%l':
617
-				$format = str_replace($match, $this->formatLongWeekday(), $format);
618
-				break;
619
-			case '%D':
620
-				$format = str_replace($match, $this->formatShortWeekday(), $format);
621
-				break;
622
-			case '%N':
623
-				$format = str_replace($match, $this->formatIsoWeekday(), $format);
624
-				break;
625
-			case '%w':
626
-				$format = str_replace($match, $this->formatNumericWeekday(), $format);
627
-				break;
628
-			case '%z':
629
-				$format = str_replace($match, $this->formatDayOfYear(), $format);
630
-				break;
631
-			case '%F':
632
-				$format = str_replace($match, $this->formatLongMonth($case), $format);
633
-				break;
634
-			case '%m':
635
-				$format = str_replace($match, $this->formatMonthZeros(), $format);
636
-				break;
637
-			case '%M':
638
-				$format = str_replace($match, $this->formatShortMonth(), $format);
639
-				break;
640
-			case '%n':
641
-				$format = str_replace($match, $this->formatMonth(), $format);
642
-				break;
643
-			case '%t':
644
-				$format = str_replace($match, $this->daysInMonth(), $format);
645
-				break;
646
-			case '%L':
647
-				$format = str_replace($match, (int) $this->isLeapYear(), $format);
648
-				break;
649
-			case '%Y':
650
-				$format = str_replace($match, $this->formatLongYear(), $format);
651
-				break;
652
-			case '%y':
653
-				$format = str_replace($match, $this->formatShortYear(), $format);
654
-				break;
655
-				// These 4 extensions are useful for re-formatting gedcom dates.
656
-			case '%@':
657
-				$format = str_replace($match, $this->calendar->gedcomCalendarEscape(), $format);
658
-				break;
659
-			case '%A':
660
-				$format = str_replace($match, $this->formatGedcomDay(), $format);
661
-				break;
662
-			case '%O':
663
-				$format = str_replace($match, $this->formatGedcomMonth(), $format);
664
-				break;
665
-			case '%E':
666
-				$format = str_replace($match, $this->formatGedcomYear(), $format);
667
-				break;
610
+				case '%d':
611
+					$format = str_replace($match, $this->formatDayZeros(), $format);
612
+					break;
613
+				case '%j':
614
+					$format = str_replace($match, $this->formatDay(), $format);
615
+					break;
616
+				case '%l':
617
+					$format = str_replace($match, $this->formatLongWeekday(), $format);
618
+					break;
619
+				case '%D':
620
+					$format = str_replace($match, $this->formatShortWeekday(), $format);
621
+					break;
622
+				case '%N':
623
+					$format = str_replace($match, $this->formatIsoWeekday(), $format);
624
+					break;
625
+				case '%w':
626
+					$format = str_replace($match, $this->formatNumericWeekday(), $format);
627
+					break;
628
+				case '%z':
629
+					$format = str_replace($match, $this->formatDayOfYear(), $format);
630
+					break;
631
+				case '%F':
632
+					$format = str_replace($match, $this->formatLongMonth($case), $format);
633
+					break;
634
+				case '%m':
635
+					$format = str_replace($match, $this->formatMonthZeros(), $format);
636
+					break;
637
+				case '%M':
638
+					$format = str_replace($match, $this->formatShortMonth(), $format);
639
+					break;
640
+				case '%n':
641
+					$format = str_replace($match, $this->formatMonth(), $format);
642
+					break;
643
+				case '%t':
644
+					$format = str_replace($match, $this->daysInMonth(), $format);
645
+					break;
646
+				case '%L':
647
+					$format = str_replace($match, (int) $this->isLeapYear(), $format);
648
+					break;
649
+				case '%Y':
650
+					$format = str_replace($match, $this->formatLongYear(), $format);
651
+					break;
652
+				case '%y':
653
+					$format = str_replace($match, $this->formatShortYear(), $format);
654
+					break;
655
+					// These 4 extensions are useful for re-formatting gedcom dates.
656
+				case '%@':
657
+					$format = str_replace($match, $this->calendar->gedcomCalendarEscape(), $format);
658
+					break;
659
+				case '%A':
660
+					$format = str_replace($match, $this->formatGedcomDay(), $format);
661
+					break;
662
+				case '%O':
663
+					$format = str_replace($match, $this->formatGedcomMonth(), $format);
664
+					break;
665
+				case '%E':
666
+					$format = str_replace($match, $this->formatGedcomYear(), $format);
667
+					break;
668 668
 			}
669 669
 		}
670 670
 
@@ -769,16 +769,16 @@  discard block
 block discarded – undo
769 769
 	 */
770 770
 	protected function formatLongMonth($case = 'NOMINATIVE') {
771 771
 		switch ($case) {
772
-		case 'GENITIVE':
773
-			return $this->monthNameGenitiveCase($this->m, $this->isLeapYear());
774
-		case 'NOMINATIVE':
775
-			return $this->monthNameNominativeCase($this->m, $this->isLeapYear());
776
-		case 'LOCATIVE':
777
-			return $this->monthNameLocativeCase($this->m, $this->isLeapYear());
778
-		case 'INSTRUMENTAL':
779
-			return $this->monthNameInstrumentalCase($this->m, $this->isLeapYear());
780
-		default:
781
-			throw new \InvalidArgumentException($case);
772
+			case 'GENITIVE':
773
+				return $this->monthNameGenitiveCase($this->m, $this->isLeapYear());
774
+			case 'NOMINATIVE':
775
+				return $this->monthNameNominativeCase($this->m, $this->isLeapYear());
776
+			case 'LOCATIVE':
777
+				return $this->monthNameLocativeCase($this->m, $this->isLeapYear());
778
+			case 'INSTRUMENTAL':
779
+				return $this->monthNameInstrumentalCase($this->m, $this->isLeapYear());
780
+			default:
781
+				throw new \InvalidArgumentException($case);
782 782
 		}
783 783
 	}
784 784
 
Please login to merge, or discard this patch.
app/Date/JewishDate.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
 	/**
248 248
 	 * Which months follows this one? Calendars with leap-months should provide their own implementation.
249 249
 	 *
250
-	 * @return int[]
250
+	 * @return integer[]
251 251
 	 */
252 252
 	protected function nextMonth() {
253 253
 		if ($this->m == 6 && !$this->isLeapYear()) {
Please login to merge, or discard this patch.
relationship.php 2 patches
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,8 @@  discard block
 block discarded – undo
103 103
 					<?php if ($ancestors_only === '1'): ?>
104 104
 						<input type="hidden" name="ancestors" value="1">
105 105
 						<?php echo I18N::translate('Find relationships via ancestors') ?>
106
-					<?php else: ?>
106
+					<?php else {
107
+	: ?>
107 108
 						<label>
108 109
 							<input type="radio" name="ancestors" value="0" <?php echo $ancestors == 0 ? 'checked' : '' ?>>
109 110
 							<?php echo I18N::translate('Find any relationship') ?>
@@ -113,14 +114,17 @@  discard block
 block discarded – undo
113 114
 							<input type="radio" name="ancestors" value="1" <?php echo $ancestors == 1 ? 'checked' : '' ?>>
114 115
 							<?php echo I18N::translate('Find relationships via ancestors') ?>
115 116
 						</label>
116
-					<?php endif; ?>
117
+					<?php endif;
118
+}
119
+?>
117 120
 
118 121
 					<hr>
119 122
 
120 123
 					<?php if ($max_recursion == 0): ?>
121 124
 						<?php echo I18N::translate('Find the closest relationships') ?>
122 125
 						<input type="hidden" name="recursion" value="0">
123
-					<?php else: ?>
126
+					<?php else {
127
+	: ?>
124 128
 						<label>
125 129
 							<input type="radio" name="recursion" value="0" <?php echo $recursion == 0 ? 'checked' : '' ?>>
126 130
 							<?php echo I18N::translate('Find the closest relationships') ?>
@@ -132,7 +136,9 @@  discard block
 block discarded – undo
132 136
 								<?php echo I18N::translate('Find all possible relationships') ?>
133 137
 							<?php else: ?>
134 138
 								<?php echo I18N::translate('Find other relationships') ?>
135
-							<?php endif; ?>
139
+							<?php endif;
140
+}
141
+?>
136 142
 						</label>
137 143
 					<?php endif; ?>
138 144
 				</td>
Please login to merge, or discard this patch.
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -179,39 +179,39 @@
 block discarded – undo
179 179
 		foreach ($path as $n => $xref) {
180 180
 			if ($n % 2 === 1) {
181 181
 				switch ($relationships[$n]) {
182
-				case 'hus':
183
-				case 'wif':
184
-				case 'spo':
185
-				case 'bro':
186
-				case 'sis':
187
-				case 'sib':
188
-					$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px;">' . $horizontal_arrow . '</div></div>';
189
-					$x += 2;
190
-					break;
191
-				case 'son':
192
-				case 'dau':
193
-				case 'chi':
194
-					if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) {
195
-						$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px; text-align: start;">' . $down_arrow . '</div></div>';
182
+					case 'hus':
183
+					case 'wif':
184
+					case 'spo':
185
+					case 'bro':
186
+					case 'sis':
187
+					case 'sib':
188
+						$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px;">' . $horizontal_arrow . '</div></div>';
196 189
 						$x += 2;
197
-					} else {
198
-						$table[$x][$y - 1] = '<div style="background:url(' . Theme::theme()
199
-								->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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . $down_arrow . '</div></div>';
200
-					}
201
-					$y -= 2;
202
-					break;
203
-				case 'fat':
204
-				case 'mot':
205
-				case 'par':
206
-					if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) {
207
-						$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px; text-align: end;">' . $up_arrow . '</div></div>';
208
-						$x += 2;
209
-					} else {
210
-						$table[$x][$y + 1] = '<div style="background:url(' . Theme::theme()
211
-								->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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . $up_arrow . '</div></div>';
212
-					}
213
-					$y += 2;
214
-					break;
190
+						break;
191
+					case 'son':
192
+					case 'dau':
193
+					case 'chi':
194
+						if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) {
195
+							$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px; text-align: start;">' . $down_arrow . '</div></div>';
196
+							$x += 2;
197
+						} else {
198
+							$table[$x][$y - 1] = '<div style="background:url(' . Theme::theme()
199
+									->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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . $down_arrow . '</div></div>';
200
+						}
201
+						$y -= 2;
202
+						break;
203
+					case 'fat':
204
+					case 'mot':
205
+					case 'par':
206
+						if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) {
207
+							$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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="height: 32px; text-align: end;">' . $up_arrow . '</div></div>';
208
+							$x += 2;
209
+						} else {
210
+							$table[$x][$y + 1] = '<div style="background:url(' . Theme::theme()
211
+									->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], $WT_TREE), Individual::getInstance($path[$n + 1], $WT_TREE)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . $up_arrow . '</div></div>';
212
+						}
213
+						$y += 2;
214
+						break;
215 215
 				}
216 216
 				$max_x = max($max_x, $x);
217 217
 				$min_y = min($min_y, $y);
Please login to merge, or discard this patch.
admin_module_charts.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,11 @@
 block discarded – undo
81 81
 				<td class="col-xs-2">
82 82
 					<?php if ($module instanceof ModuleConfigInterface): ?>
83 83
 						<a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a>
84
-					<?php else: ?>
85
-						<?php echo $module->getTitle(); ?>
84
+					<?php else {
85
+	: ?>
86
+						<?php echo $module->getTitle();
87
+}
88
+?>
86 89
 					<?php endif; ?>
87 90
 				</td>
88 91
 				<td class="col-xs-5"><?php echo $module->getDescription(); ?></td>
Please login to merge, or discard this patch.
admin_module_tabs.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.
admin_module_reports.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,11 @@
 block discarded – undo
81 81
 				<td class="col-xs-2">
82 82
 					<?php if ($module instanceof ModuleConfigInterface): ?>
83 83
 						<a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a>
84
-					<?php else: ?>
85
-						<?php echo $module->getTitle(); ?>
84
+					<?php else {
85
+	: ?>
86
+						<?php echo $module->getTitle();
87
+}
88
+?>
86 89
 					<?php endif; ?>
87 90
 				</td>
88 91
 				<td class="col-xs-5"><?php echo $module->getDescription(); ?></td>
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.
app/Mail.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Exception;
19
-use Swift_Mailer;
20 19
 use Swift_MailTransport;
20
+use Swift_Mailer;
21 21
 use Swift_Message;
22 22
 use Swift_NullTransport;
23 23
 use Swift_Preferences;
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -103,20 +103,20 @@
 block discarded – undo
103 103
 		case 'sendmail':
104 104
 			return Swift_SendmailTransport::newInstance();
105 105
 		case 'external':
106
-            $transport = Swift_SmtpTransport::newInstance()
107
-                ->setHost(Site::getPreference('SMTP_HOST'))
108
-                ->setPort(Site::getPreference('SMTP_PORT'))
109
-                ->setLocalDomain(Site::getPreference('SMTP_HELO'));
106
+						$transport = Swift_SmtpTransport::newInstance()
107
+								->setHost(Site::getPreference('SMTP_HOST'))
108
+								->setPort(Site::getPreference('SMTP_PORT'))
109
+								->setLocalDomain(Site::getPreference('SMTP_HELO'));
110 110
 
111
-            if (Site::getPreference('SMTP_AUTH')) {
112
-                $transport
113
-                    ->setUsername(Site::getPreference('SMTP_AUTH_USER'))
114
-                    ->setPassword(Site::getPreference('SMTP_AUTH_PASS'));
115
-            }
111
+						if (Site::getPreference('SMTP_AUTH')) {
112
+								$transport
113
+										->setUsername(Site::getPreference('SMTP_AUTH_USER'))
114
+										->setPassword(Site::getPreference('SMTP_AUTH_PASS'));
115
+						}
116 116
 
117
-            if (Site::getPreference('SMTP_SSL') !== 'none') {
118
-                $transport->setEncryption(Site::getPreference('SMTP_SSL'));
119
-            }
117
+						if (Site::getPreference('SMTP_SSL') !== 'none') {
118
+								$transport->setEncryption(Site::getPreference('SMTP_SSL'));
119
+						}
120 120
 
121 121
 			return $transport;
122 122
 		default:
Please login to merge, or discard this patch.
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -98,30 +98,30 @@
 block discarded – undo
98 98
 	 */
99 99
 	public static function transport() {
100 100
 		switch (Site::getPreference('SMTP_ACTIVE')) {
101
-		case 'internal':
102
-			return Swift_MailTransport::newInstance();
103
-		case 'sendmail':
104
-			return Swift_SendmailTransport::newInstance();
105
-		case 'external':
106
-            $transport = Swift_SmtpTransport::newInstance()
107
-                ->setHost(Site::getPreference('SMTP_HOST'))
108
-                ->setPort(Site::getPreference('SMTP_PORT'))
109
-                ->setLocalDomain(Site::getPreference('SMTP_HELO'));
101
+			case 'internal':
102
+				return Swift_MailTransport::newInstance();
103
+			case 'sendmail':
104
+				return Swift_SendmailTransport::newInstance();
105
+			case 'external':
106
+            	$transport = Swift_SmtpTransport::newInstance()
107
+                	->setHost(Site::getPreference('SMTP_HOST'))
108
+                	->setPort(Site::getPreference('SMTP_PORT'))
109
+                	->setLocalDomain(Site::getPreference('SMTP_HELO'));
110 110
 
111
-            if (Site::getPreference('SMTP_AUTH')) {
112
-                $transport
113
-                    ->setUsername(Site::getPreference('SMTP_AUTH_USER'))
114
-                    ->setPassword(Site::getPreference('SMTP_AUTH_PASS'));
115
-            }
111
+            	if (Site::getPreference('SMTP_AUTH')) {
112
+                	$transport
113
+                    	->setUsername(Site::getPreference('SMTP_AUTH_USER'))
114
+                    	->setPassword(Site::getPreference('SMTP_AUTH_PASS'));
115
+            	}
116 116
 
117
-            if (Site::getPreference('SMTP_SSL') !== 'none') {
118
-                $transport->setEncryption(Site::getPreference('SMTP_SSL'));
119
-            }
117
+            	if (Site::getPreference('SMTP_SSL') !== 'none') {
118
+                	$transport->setEncryption(Site::getPreference('SMTP_SSL'));
119
+            	}
120 120
 
121
-			return $transport;
122
-		default:
123
-			// For testing
124
-			return Swift_NullTransport::newInstance();
121
+				return $transport;
122
+			default:
123
+				// For testing
124
+				return Swift_NullTransport::newInstance();
125 125
 		}
126 126
 	}
127 127
 }
Please login to merge, or discard this patch.
expand_view.php 1 patch
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -38,38 +38,38 @@
 block discarded – undo
38 38
 
39 39
 foreach ($facts as $fact) {
40 40
 	switch ($fact->getTag()) {
41
-	case 'ADDR':
42
-	case 'ALIA':
43
-	case 'ASSO':
44
-	case 'CHAN':
45
-	case 'CHIL':
46
-	case 'EMAIL':
47
-	case 'FAMC':
48
-	case 'FAMS':
49
-	case 'HUSB':
50
-	case 'NAME':
51
-	case 'NOTE':
52
-	case 'OBJE':
53
-	case 'PHON':
54
-	case 'RESI':
55
-	case 'RESN':
56
-	case 'SEX':
57
-	case 'SOUR':
58
-	case 'SSN':
59
-	case 'SUBM':
60
-	case 'TITL':
61
-	case 'URL':
62
-	case 'WIFE':
63
-	case 'WWW':
64
-	case '_EMAIL':
65
-	case '_TODO':
66
-	case '_UID':
67
-	case '_WT_OBJE_SORT':
68
-		// Do not show these
69
-		break;
70
-	default:
71
-		// Simple version of FunctionsPrintFacts::print_fact()
72
-		echo $fact->summary();
73
-		break;
41
+		case 'ADDR':
42
+		case 'ALIA':
43
+		case 'ASSO':
44
+		case 'CHAN':
45
+		case 'CHIL':
46
+		case 'EMAIL':
47
+		case 'FAMC':
48
+		case 'FAMS':
49
+		case 'HUSB':
50
+		case 'NAME':
51
+		case 'NOTE':
52
+		case 'OBJE':
53
+		case 'PHON':
54
+		case 'RESI':
55
+		case 'RESN':
56
+		case 'SEX':
57
+		case 'SOUR':
58
+		case 'SSN':
59
+		case 'SUBM':
60
+		case 'TITL':
61
+		case 'URL':
62
+		case 'WIFE':
63
+		case 'WWW':
64
+		case '_EMAIL':
65
+		case '_TODO':
66
+		case '_UID':
67
+		case '_WT_OBJE_SORT':
68
+			// Do not show these
69
+			break;
70
+		default:
71
+			// Simple version of FunctionsPrintFacts::print_fact()
72
+			echo $fact->summary();
73
+			break;
74 74
 	}
75 75
 }
Please login to merge, or discard this patch.