Completed
Push — charts ( 596e2b...937e25 )
by Greg
11:46
created
app/Controller/PedigreeController.php 3 patches
Switch Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -102,26 +102,26 @@  discard block
 block discarded – undo
102 102
 
103 103
 		$this->arrows = new \stdClass();
104 104
 		switch ($this->orientation) {
105
-			case self::PORTRAIT:
106
-				//drop through
107
-			case self::LANDSCAPE:
108
-				$this->arrows->prevGen = I18N::direction() === 'rtl' ? 'icon-larrow' : 'icon-rarrow';
109
-				$this->arrows->menu    = I18N::direction() === 'rtl' ? 'icon-rarrow' : 'icon-larrow';
110
-				$addoffset['x']        = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
111
-				$addoffset['y']        = 0;
112
-				break;
113
-			case self::OLDEST_AT_TOP:
114
-				$this->arrows->prevGen = 'icon-uarrow';
115
-				$this->arrows->menu    = 'icon-darrow';
116
-				$addoffset['x']        = 0;
117
-				$addoffset['y']        = $this->root->getSpouseFamilies() ? self::ARROW_SIZE : 0;
118
-				break;
119
-			case self::OLDEST_AT_BOTTOM:
120
-				$this->arrows->prevGen = 'icon-darrow';
121
-				$this->arrows->menu    = 'icon-uarrow';
122
-				$addoffset['x']        = 0;
123
-				$addoffset['y']        = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
124
-				break;
105
+		case self::PORTRAIT:
106
+			//drop through
107
+		case self::LANDSCAPE:
108
+			$this->arrows->prevGen = I18N::direction() === 'rtl' ? 'icon-larrow' : 'icon-rarrow';
109
+			$this->arrows->menu    = I18N::direction() === 'rtl' ? 'icon-rarrow' : 'icon-larrow';
110
+			$addoffset['x']        = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
111
+			$addoffset['y']        = 0;
112
+			break;
113
+		case self::OLDEST_AT_TOP:
114
+			$this->arrows->prevGen = 'icon-uarrow';
115
+			$this->arrows->menu    = 'icon-darrow';
116
+			$addoffset['x']        = 0;
117
+			$addoffset['y']        = $this->root->getSpouseFamilies() ? self::ARROW_SIZE : 0;
118
+			break;
119
+		case self::OLDEST_AT_BOTTOM:
120
+			$this->arrows->prevGen = 'icon-darrow';
121
+			$this->arrows->menu    = 'icon-uarrow';
122
+			$addoffset['x']        = 0;
123
+			$addoffset['y']        = $this->chartHasAncestors ? self::ARROW_SIZE : 0;
124
+			break;
125 125
 		}
126 126
 
127 127
 		// -- this next section will create and position the DIV layers for the pedigree tree
@@ -150,73 +150,73 @@  discard block
 block discarded – undo
150 150
 
151 151
 			// -- calculate the xoffset
152 152
 			switch ($this->orientation) {
153
-				case self::PORTRAIT:
154
-					$xoffset = ($this->generations - $curgen) * (($this->getBoxDimensions()->width + $bxspacing) / 1.8);
155
-					if(!$i && $this->root->getSpouseFamilies()) {
156
-						$xoffset -= self::ARROW_SIZE;
153
+			case self::PORTRAIT:
154
+				$xoffset = ($this->generations - $curgen) * (($this->getBoxDimensions()->width + $bxspacing) / 1.8);
155
+				if(!$i && $this->root->getSpouseFamilies()) {
156
+					$xoffset -= self::ARROW_SIZE;
157
+				}
158
+				// -- compact the tree
159
+				if ($curgen < $this->generations) {
160
+					if ($i % 2 == 0) {
161
+						$yoffset = $yoffset - (($boxspacing / 2) * ($curgen - 1));
162
+					} else {
163
+						$yoffset = $yoffset + (($boxspacing / 2) * ($curgen - 1));
157 164
 					}
158
-					// -- compact the tree
159
-					if ($curgen < $this->generations) {
160
-						if ($i % 2 == 0) {
161
-							$yoffset = $yoffset - (($boxspacing / 2) * ($curgen - 1));
165
+					$parent = (int) (($i - 1) / 2);
166
+					$pgen   = $curgen;
167
+					while ($parent > 0) {
168
+						if ($parent % 2 == 0) {
169
+							$yoffset = $yoffset - (($boxspacing / 2) * $pgen);
162 170
 						} else {
163
-							$yoffset = $yoffset + (($boxspacing / 2) * ($curgen - 1));
164
-						}
165
-						$parent = (int) (($i - 1) / 2);
166
-						$pgen   = $curgen;
167
-						while ($parent > 0) {
168
-							if ($parent % 2 == 0) {
169
-								$yoffset = $yoffset - (($boxspacing / 2) * $pgen);
170
-							} else {
171
-								$yoffset = $yoffset + (($boxspacing / 2) * $pgen);
172
-							}
173
-							$pgen++;
174
-							if ($pgen > 3) {
175
-								$temp = 0;
176
-								for ($j = 1; $j < ($pgen - 2); $j++) {
177
-									$temp += (pow(2, $j) - 1);
178
-								}
179
-								if ($parent % 2 == 0) {
180
-									$yoffset = $yoffset - (($boxspacing / 2) * $temp);
181
-								} else {
182
-									$yoffset = $yoffset + (($boxspacing / 2) * $temp);
183
-								}
184
-							}
185
-							$parent = (int) (($parent - 1) / 2);
171
+							$yoffset = $yoffset + (($boxspacing / 2) * $pgen);
186 172
 						}
187
-						if ($curgen > 3) {
173
+						$pgen++;
174
+						if ($pgen > 3) {
188 175
 							$temp = 0;
189
-							for ($j = 1; $j < ($curgen - 2); $j++) {
176
+							for ($j = 1; $j < ($pgen - 2); $j++) {
190 177
 								$temp += (pow(2, $j) - 1);
191 178
 							}
192
-							if ($i % 2 == 0) {
179
+							if ($parent % 2 == 0) {
193 180
 								$yoffset = $yoffset - (($boxspacing / 2) * $temp);
194 181
 							} else {
195 182
 								$yoffset = $yoffset + (($boxspacing / 2) * $temp);
196 183
 							}
197 184
 						}
185
+						$parent = (int) (($parent - 1) / 2);
198 186
 					}
199
-					$yoffset -= (($boxspacing / 2) * pow(2, ($this->generations - 2)) - ($boxspacing / 2));
200
-					break;
201
-				case self::LANDSCAPE:
202
-					$xoffset = ($this->generations - $curgen) * ($this->getBoxDimensions()->width + $bxspacing);
203
-					if ($curgen == 1) {
204
-						$xoffset += 10;
205
-					}
206
-					break;
207
-				case self::OLDEST_AT_TOP:
208
-					//swap x & y offsets as chart is rotated
209
-					$xoffset = $yoffset;
210
-					$yoffset = $curgen  * ($this->getBoxDimensions()->height + ($byspacing * 4));
211
-					break;
212
-				case self::OLDEST_AT_BOTTOM:
213
-					//swap x & y offsets as chart is rotated
214
-					$xoffset = $yoffset;
215
-					$yoffset = ($this->generations - $curgen) * ($this->getBoxDimensions()->height + ($byspacing * 2));
216
-					if ($i && $this->root->getSpouseFamilies()) {
217
-						$yoffset += self::ARROW_SIZE;
187
+					if ($curgen > 3) {
188
+						$temp = 0;
189
+						for ($j = 1; $j < ($curgen - 2); $j++) {
190
+							$temp += (pow(2, $j) - 1);
191
+						}
192
+						if ($i % 2 == 0) {
193
+							$yoffset = $yoffset - (($boxspacing / 2) * $temp);
194
+						} else {
195
+							$yoffset = $yoffset + (($boxspacing / 2) * $temp);
196
+						}
218 197
 					}
219
-					break;
198
+				}
199
+				$yoffset -= (($boxspacing / 2) * pow(2, ($this->generations - 2)) - ($boxspacing / 2));
200
+				break;
201
+			case self::LANDSCAPE:
202
+				$xoffset = ($this->generations - $curgen) * ($this->getBoxDimensions()->width + $bxspacing);
203
+				if ($curgen == 1) {
204
+					$xoffset += 10;
205
+				}
206
+				break;
207
+			case self::OLDEST_AT_TOP:
208
+				//swap x & y offsets as chart is rotated
209
+				$xoffset = $yoffset;
210
+				$yoffset = $curgen  * ($this->getBoxDimensions()->height + ($byspacing * 4));
211
+				break;
212
+			case self::OLDEST_AT_BOTTOM:
213
+				//swap x & y offsets as chart is rotated
214
+				$xoffset = $yoffset;
215
+				$yoffset = ($this->generations - $curgen) * ($this->getBoxDimensions()->height + ($byspacing * 2));
216
+				if ($i && $this->root->getSpouseFamilies()) {
217
+					$yoffset += self::ARROW_SIZE;
218
+				}
219
+				break;
220 220
 			}
221 221
 			$this->nodes[$i]["x"] = (int) $xoffset;
222 222
 			$this->nodes[$i]["y"] = (int) $yoffset;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			switch ($this->orientation) {
153 153
 				case self::PORTRAIT:
154 154
 					$xoffset = ($this->generations - $curgen) * (($this->getBoxDimensions()->width + $bxspacing) / 1.8);
155
-					if(!$i && $this->root->getSpouseFamilies()) {
155
+					if (!$i && $this->root->getSpouseFamilies()) {
156 156
 						$xoffset -= self::ARROW_SIZE;
157 157
 					}
158 158
 					// -- compact the tree
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 				case self::OLDEST_AT_TOP:
208 208
 					//swap x & y offsets as chart is rotated
209 209
 					$xoffset = $yoffset;
210
-					$yoffset = $curgen  * ($this->getBoxDimensions()->height + ($byspacing * 4));
210
+					$yoffset = $curgen * ($this->getBoxDimensions()->height + ($byspacing * 4));
211 211
 					break;
212 212
 				case self::OLDEST_AT_BOTTOM:
213 213
 					//swap x & y offsets as chart is rotated
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 			return $item['y'];
246 246
 		}, $this->nodes));
247 247
 
248
-		$this->chartsize['x'] = $max_xoffset + $bxspacing + $this->getBoxDimensions()->width  + $addoffset['x'];
248
+		$this->chartsize['x'] = $max_xoffset + $bxspacing + $this->getBoxDimensions()->width + $addoffset['x'];
249 249
 		$this->chartsize['y'] = $max_yoffset + $byspacing + $this->getBoxDimensions()->height + $addoffset['y'];
250 250
 	}
251 251
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Controller/RepositoryController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		$menu = new Menu(I18N::translate('Edit'), '#', 'menu-repo');
51 51
 
52 52
 		if (Auth::isEditor($this->record->getTree())) {
53
-			$fact    = $this->record->getFirstFact('NAME');
53
+			$fact = $this->record->getFirstFact('NAME');
54 54
 			if ($fact) {
55 55
 				// Edit existing name
56 56
 				$menu->addSubmenu(new Menu(I18N::translate('Edit repository'), '#', 'menu-repo-edit', array(
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/File.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		try {
48 48
 			$fp = fsockopen($scheme . $host, $port, $errno, $errstr, 5);
49 49
 
50
-			fputs($fp, "GET $path?$query HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n");
50
+			fputs($fp, "get $path?$query HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n");
51 51
 
52 52
 			// The first part of the response include the HTTP headers
53 53
 			$response = fread($fp, 65536);
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Functions/FunctionsDate.php 2 patches
Switch Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -32,32 +32,32 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public static function getAgeAtEvent($age_string, $show_years) {
34 34
 		switch (strtoupper($age_string)) {
35
-			case 'CHILD':
36
-				return I18N::translate('Child');
37
-			case 'INFANT':
38
-				return I18N::translate('Infant');
39
-			case 'STILLBORN':
40
-				return I18N::translate('Stillborn');
41
-			default:
42
-				return preg_replace_callback(
43
-					array(
44
-						'/(\d+)([ymwd])/',
45
-					),
46
-					function ($match) use ($age_string, $show_years) {
47
-						switch ($match[2]) {
48
-							case 'y':
49
-								if ($show_years || preg_match('/[dm]/', $age_string)) {
50
-									return I18N::plural('%s year', '%s years', $match[1], I18N::digits($match[1]));
51
-								} else {
52
-									return I18N::digits($match[1]);
53
-								}
54
-							case 'm':
55
-								return I18N::plural('%s month', '%s months', $match[1], I18N::digits($match[1]));
56
-							case 'w':
57
-								return I18N::plural('%s week', '%s weeks', $match[1], I18N::digits($match[1]));
58
-							case 'd':
59
-								return I18N::plural('%s day', '%s days', $match[1], I18N::digits($match[1]));
60
-						}
35
+		case 'CHILD':
36
+			return I18N::translate('Child');
37
+		case 'INFANT':
38
+			return I18N::translate('Infant');
39
+		case 'STILLBORN':
40
+			return I18N::translate('Stillborn');
41
+		default:
42
+			return preg_replace_callback(
43
+				array(
44
+					'/(\d+)([ymwd])/',
45
+				),
46
+				function ($match) use ($age_string, $show_years) {
47
+					switch ($match[2]) {
48
+					case 'y':
49
+					if ($show_years || preg_match('/[dm]/', $age_string)) {
50
+					return I18N::plural('%s year', '%s years', $match[1], I18N::digits($match[1]));
51
+					} else {
52
+					return I18N::digits($match[1]);
53
+					}
54
+					case 'm':
55
+					return I18N::plural('%s month', '%s months', $match[1], I18N::digits($match[1]));
56
+					case 'w':
57
+					return I18N::plural('%s week', '%s weeks', $match[1], I18N::digits($match[1]));
58
+					case 'd':
59
+					return I18N::plural('%s day', '%s days', $match[1], I18N::digits($match[1]));
60
+					}
61 61
 					},
62 62
 					$age_string
63 63
 				);
@@ -79,40 +79,40 @@  discard block
 block discarded – undo
79 79
 		preg_match_all('/%[^%]/', $time_fmt, $matches);
80 80
 		foreach ($matches[0] as $match) {
81 81
 			switch ($match) {
82
-				case '%a':
83
-					$t = gmdate('His', $time);
84
-					if ($t == '000000') {
85
-						$time_fmt = str_replace($match, /* I18N: time format “%a” - exactly 00:00:00 */
86
-							I18N::translate('midnight'), $time_fmt);
87
-					} elseif ($t < '120000') {
88
-						$time_fmt = str_replace($match, /* I18N: time format “%a” - between 00:00:01 and 11:59:59 */
89
-							I18N::translate('a.m.'), $time_fmt);
90
-					} elseif ($t == '120000') {
91
-						$time_fmt = str_replace($match, /* I18N: time format “%a” - exactly 12:00:00 */
92
-							I18N::translate('noon'), $time_fmt);
93
-					} else {
94
-						$time_fmt = str_replace($match, /* I18N: time format “%a” - between 12:00:01 and 23:59:59 */
95
-							I18N::translate('p.m.'), $time_fmt);
96
-					}
97
-					break;
98
-				case '%A':
99
-					$t = gmdate('His', $time);
100
-					if ($t == '000000') {
101
-						$time_fmt = str_replace($match, /* I18N: time format “%A” - exactly 00:00:00 */
102
-							I18N::translate('Midnight'), $time_fmt);
103
-					} elseif ($t < '120000') {
104
-						$time_fmt = str_replace($match, /* I18N: time format “%A” - between 00:00:01 and 11:59:59 */
105
-							I18N::translate('A.M.'), $time_fmt);
106
-					} elseif ($t == '120000') {
107
-						$time_fmt = str_replace($match, /* I18N: time format “%A” - exactly 12:00:00 */
108
-							I18N::translate('Noon'), $time_fmt);
109
-					} else {
110
-						$time_fmt = str_replace($match, /* I18N: time format “%A” - between 12:00:01 and 23:59:59 */
111
-							I18N::translate('P.M.'), $time_fmt);
112
-					}
113
-					break;
114
-				default:
115
-					$time_fmt = str_replace($match, I18N::digits(gmdate(substr($match, -1), $time)), $time_fmt);
82
+			case '%a':
83
+				$t = gmdate('His', $time);
84
+				if ($t == '000000') {
85
+					$time_fmt = str_replace($match, /* I18N: time format “%a” - exactly 00:00:00 */
86
+						I18N::translate('midnight'), $time_fmt);
87
+				} elseif ($t < '120000') {
88
+					$time_fmt = str_replace($match, /* I18N: time format “%a” - between 00:00:01 and 11:59:59 */
89
+						I18N::translate('a.m.'), $time_fmt);
90
+				} elseif ($t == '120000') {
91
+					$time_fmt = str_replace($match, /* I18N: time format “%a” - exactly 12:00:00 */
92
+						I18N::translate('noon'), $time_fmt);
93
+				} else {
94
+					$time_fmt = str_replace($match, /* I18N: time format “%a” - between 12:00:01 and 23:59:59 */
95
+						I18N::translate('p.m.'), $time_fmt);
96
+				}
97
+				break;
98
+			case '%A':
99
+				$t = gmdate('His', $time);
100
+				if ($t == '000000') {
101
+					$time_fmt = str_replace($match, /* I18N: time format “%A” - exactly 00:00:00 */
102
+						I18N::translate('Midnight'), $time_fmt);
103
+				} elseif ($t < '120000') {
104
+					$time_fmt = str_replace($match, /* I18N: time format “%A” - between 00:00:01 and 11:59:59 */
105
+						I18N::translate('A.M.'), $time_fmt);
106
+				} elseif ($t == '120000') {
107
+					$time_fmt = str_replace($match, /* I18N: time format “%A” - exactly 12:00:00 */
108
+						I18N::translate('Noon'), $time_fmt);
109
+				} else {
110
+					$time_fmt = str_replace($match, /* I18N: time format “%A” - between 12:00:01 and 23:59:59 */
111
+						I18N::translate('P.M.'), $time_fmt);
112
+				}
113
+				break;
114
+			default:
115
+				$time_fmt = str_replace($match, I18N::digits(gmdate(substr($match, -1), $time)), $time_fmt);
116 116
 			}
117 117
 		}
118 118
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Functions/FunctionsDb.php 2 patches
Switch Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -248,18 +248,18 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public static function searchIndividualsPhonetic($soundex, $lastname, $firstname, $place, array $trees) {
250 250
 		switch ($soundex) {
251
-			case 'Russell':
252
-				$givn_sdx = Soundex::russell($firstname);
253
-				$surn_sdx = Soundex::russell($lastname);
254
-				$plac_sdx = Soundex::russell($place);
255
-				break;
256
-			case 'DaitchM':
257
-				$givn_sdx = Soundex::daitchMokotoff($firstname);
258
-				$surn_sdx = Soundex::daitchMokotoff($lastname);
259
-				$plac_sdx = Soundex::daitchMokotoff($place);
260
-				break;
261
-			default:
262
-				throw new \DomainException('soundex: ' . $soundex);
251
+		case 'Russell':
252
+			$givn_sdx = Soundex::russell($firstname);
253
+			$surn_sdx = Soundex::russell($lastname);
254
+			$plac_sdx = Soundex::russell($place);
255
+			break;
256
+		case 'DaitchM':
257
+			$givn_sdx = Soundex::daitchMokotoff($firstname);
258
+			$surn_sdx = Soundex::daitchMokotoff($lastname);
259
+			$plac_sdx = Soundex::daitchMokotoff($place);
260
+			break;
261
+		default:
262
+			throw new \DomainException('soundex: ' . $soundex);
263 263
 		}
264 264
 
265 265
 		// Nothing to search for?  Return nothing.
@@ -291,12 +291,12 @@  discard block
 block discarded – undo
291 291
 			foreach ($givn_sdx as $n => $sdx) {
292 292
 				$sql .= $n ? " OR " : "";
293 293
 				switch ($soundex) {
294
-					case 'Russell':
295
-						$sql .= "n_soundex_givn_std LIKE CONCAT('%', :given_name_" . $n . ", '%')";
296
-						break;
297
-					case 'DaitchM':
298
-						$sql .= "n_soundex_givn_dm LIKE CONCAT('%', :given_name_" . $n . ", '%')";
299
-						break;
294
+				case 'Russell':
295
+					$sql .= "n_soundex_givn_std LIKE CONCAT('%', :given_name_" . $n . ", '%')";
296
+					break;
297
+				case 'DaitchM':
298
+					$sql .= "n_soundex_givn_dm LIKE CONCAT('%', :given_name_" . $n . ", '%')";
299
+					break;
300 300
 				}
301 301
 				$args['given_name_' . $n] = $sdx;
302 302
 			}
@@ -309,12 +309,12 @@  discard block
 block discarded – undo
309 309
 			foreach ($surn_sdx as $n => $sdx) {
310 310
 				$sql .= $n ? " OR " : "";
311 311
 				switch ($soundex) {
312
-					case 'Russell':
313
-						$sql .= "n_soundex_surn_std LIKE CONCAT('%', :surname_" . $n . ", '%')";
314
-						break;
315
-					case 'DaitchM':
316
-						$sql .= "n_soundex_surn_dm LIKE CONCAT('%', :surname_" . $n . ", '%')";
317
-						break;
312
+				case 'Russell':
313
+					$sql .= "n_soundex_surn_std LIKE CONCAT('%', :surname_" . $n . ", '%')";
314
+					break;
315
+				case 'DaitchM':
316
+					$sql .= "n_soundex_surn_dm LIKE CONCAT('%', :surname_" . $n . ", '%')";
317
+					break;
318 318
 				}
319 319
 				$args['surname_' . $n] = $sdx;
320 320
 			}
@@ -327,12 +327,12 @@  discard block
 block discarded – undo
327 327
 			foreach ($plac_sdx as $n => $sdx) {
328 328
 				$sql .= $n ? " OR " : "";
329 329
 				switch ($soundex) {
330
-					case 'Russell':
331
-						$sql .= "p_std_soundex LIKE CONCAT('%', :place_" . $n . ", '%')";
332
-						break;
333
-					case 'DaitchM':
334
-						$sql .= "p_dm_soundex LIKE CONCAT('%', :place_" . $n . ", '%')";
335
-						break;
330
+				case 'Russell':
331
+					$sql .= "p_std_soundex LIKE CONCAT('%', :place_" . $n . ", '%')";
332
+					break;
333
+				case 'DaitchM':
334
+					$sql .= "p_dm_soundex LIKE CONCAT('%', :place_" . $n . ", '%')";
335
+					break;
336 336
 				}
337 337
 				$args['place_' . $n] = $sdx;
338 338
 			}
@@ -790,82 +790,82 @@  discard block
 block discarded – undo
790 790
 			} else {
791 791
 				// SPECIAL CASES:
792 792
 				switch ($anniv->m) {
793
-					case 2:
794
-						// 29 CSH does not include 30 CSH (but would include an invalid 31 CSH if there were no 30 CSH)
795
-						if ($anniv->d === 1) {
796
-							$where .= " AND d_day <= 1 AND d_mon = 2";
797
-						} elseif ($anniv->d === 30) {
798
-							$where .= " AND d_day >= 30 AND d_mon = 2";
799
-						} elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) {
800
-							$where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2";
801
-						} else {
802
-							$where .= " AND d_day = :day AND d_mon = 2";
803
-							$args['day'] = $anniv->d;
804
-						}
805
-						break;
806
-					case 3:
807
-						// 1 KSL includes 30 CSH (if this year didn’t have 30 CSH)
808
-						// 29 KSL does not include 30 KSL (but would include an invalid 31 KSL if there were no 30 KSL)
809
-						if ($anniv->d === 1) {
810
-							$tmp = new JewishDate(array($anniv->y, 'CSH', 1));
811
-							if ($tmp->daysInMonth() === 29) {
812
-								$where .= " AND (d_day <= 1 AND d_mon = 3 OR d_day = 30 AND d_mon = 2)";
813
-							} else {
814
-								$where .= " AND d_day <= 1 AND d_mon = 3";
815
-							}
816
-						} elseif ($anniv->d === 30) {
817
-							$where .= " AND d_day >= 30 AND d_mon = 3";
818
-						} elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) {
819
-							$where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3";
820
-						} else {
821
-							$where .= " AND d_day = :day AND d_mon = 3";
822
-							$args['day'] = $anniv->d;
823
-						}
824
-						break;
825
-					case 4:
826
-						// 1 TVT includes 30 KSL (if this year didn’t have 30 KSL)
827
-						if ($anniv->d === 1) {
828
-							$tmp = new JewishDate(array($anniv->y, 'KSL', 1));
829
-							if ($tmp->daysInMonth() === 29) {
830
-								$where .= " AND (d_day <=1 AND d_mon = 4 OR d_day = 30 AND d_mon = 3)";
831
-							} else {
832
-								$where .= " AND d_day <= 1 AND d_mon = 4";
833
-							}
834
-						} elseif ($anniv->d === $anniv->daysInMonth()) {
835
-							$where .= " AND d_day >= :day AND d_mon=4";
836
-							$args['day'] = $anniv->d;
793
+				case 2:
794
+					// 29 CSH does not include 30 CSH (but would include an invalid 31 CSH if there were no 30 CSH)
795
+					if ($anniv->d === 1) {
796
+						$where .= " AND d_day <= 1 AND d_mon = 2";
797
+					} elseif ($anniv->d === 30) {
798
+						$where .= " AND d_day >= 30 AND d_mon = 2";
799
+					} elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) {
800
+						$where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2";
801
+					} else {
802
+						$where .= " AND d_day = :day AND d_mon = 2";
803
+						$args['day'] = $anniv->d;
804
+					}
805
+					break;
806
+				case 3:
807
+					// 1 KSL includes 30 CSH (if this year didn’t have 30 CSH)
808
+					// 29 KSL does not include 30 KSL (but would include an invalid 31 KSL if there were no 30 KSL)
809
+					if ($anniv->d === 1) {
810
+						$tmp = new JewishDate(array($anniv->y, 'CSH', 1));
811
+						if ($tmp->daysInMonth() === 29) {
812
+							$where .= " AND (d_day <= 1 AND d_mon = 3 OR d_day = 30 AND d_mon = 2)";
837 813
 						} else {
838
-							$where .= " AND d_day = :day AND d_mon=4";
839
-							$args['day'] = $anniv->d;
814
+							$where .= " AND d_day <= 1 AND d_mon = 3";
840 815
 						}
841
-						break;
842
-					case 7: // ADS includes ADR (non-leap)
843
-						if ($anniv->d === 1) {
844
-							$where .= " AND d_day <= 1";
845
-						} elseif ($anniv->d === $anniv->daysInMonth()) {
846
-							$where .= " AND d_day >= :day";
847
-							$args['day'] = $anniv->d;
816
+					} elseif ($anniv->d === 30) {
817
+						$where .= " AND d_day >= 30 AND d_mon = 3";
818
+					} elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) {
819
+						$where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3";
820
+					} else {
821
+						$where .= " AND d_day = :day AND d_mon = 3";
822
+						$args['day'] = $anniv->d;
823
+					}
824
+					break;
825
+				case 4:
826
+					// 1 TVT includes 30 KSL (if this year didn’t have 30 KSL)
827
+					if ($anniv->d === 1) {
828
+						$tmp = new JewishDate(array($anniv->y, 'KSL', 1));
829
+						if ($tmp->daysInMonth() === 29) {
830
+							$where .= " AND (d_day <=1 AND d_mon = 4 OR d_day = 30 AND d_mon = 3)";
848 831
 						} else {
849
-							$where .= " AND d_day = :day";
850
-							$args['day'] = $anniv->d;
832
+							$where .= " AND d_day <= 1 AND d_mon = 4";
851 833
 						}
852
-						$where .= " AND (d_mon = 6 AND MOD(7 * d_year + 1, 19) >= 7 OR d_mon = 7)";
853
-						break;
854
-					case 8: // 1 NSN includes 30 ADR, if this year is non-leap
855
-						if ($anniv->d === 1) {
856
-							if ($anniv->isLeapYear()) {
857
-								$where .= " AND d_day <= 1 AND d_mon = 8";
858
-							} else {
859
-								$where .= " AND (d_day <= 1 AND d_mon = 8 OR d_day = 30 AND d_mon = 6)";
860
-							}
861
-						} elseif ($anniv->d === $anniv->daysInMonth()) {
862
-							$where .= " AND d_day >= :day AND d_mon = 8";
863
-							$args['day'] = $anniv->d;
834
+					} elseif ($anniv->d === $anniv->daysInMonth()) {
835
+						$where .= " AND d_day >= :day AND d_mon=4";
836
+						$args['day'] = $anniv->d;
837
+					} else {
838
+						$where .= " AND d_day = :day AND d_mon=4";
839
+						$args['day'] = $anniv->d;
840
+					}
841
+					break;
842
+				case 7: // ADS includes ADR (non-leap)
843
+					if ($anniv->d === 1) {
844
+						$where .= " AND d_day <= 1";
845
+					} elseif ($anniv->d === $anniv->daysInMonth()) {
846
+						$where .= " AND d_day >= :day";
847
+						$args['day'] = $anniv->d;
848
+					} else {
849
+						$where .= " AND d_day = :day";
850
+						$args['day'] = $anniv->d;
851
+					}
852
+					$where .= " AND (d_mon = 6 AND MOD(7 * d_year + 1, 19) >= 7 OR d_mon = 7)";
853
+					break;
854
+				case 8: // 1 NSN includes 30 ADR, if this year is non-leap
855
+					if ($anniv->d === 1) {
856
+						if ($anniv->isLeapYear()) {
857
+							$where .= " AND d_day <= 1 AND d_mon = 8";
864 858
 						} else {
865
-							$where .= " AND d_day = :day AND d_mon = 8";
866
-							$args['day'] = $anniv->d;
859
+							$where .= " AND (d_day <= 1 AND d_mon = 8 OR d_day = 30 AND d_mon = 6)";
867 860
 						}
868
-						break;
861
+					} elseif ($anniv->d === $anniv->daysInMonth()) {
862
+						$where .= " AND d_day >= :day AND d_mon = 8";
863
+						$args['day'] = $anniv->d;
864
+					} else {
865
+						$where .= " AND d_day = :day AND d_mon = 8";
866
+						$args['day'] = $anniv->d;
867
+					}
868
+					break;
869 869
 				}
870 870
 			}
871 871
 			// Only events in the past (includes dates without a year)
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees\Functions;
17 17
 
18 18
 use Fisharebest\Webtrees\Auth;
@@ -749,13 +749,13 @@  discard block
 block discarded – undo
749 749
 	public static function getAnniversaryEvents($jd, $facts, Tree $tree) {
750 750
 		$found_facts = array();
751 751
 		foreach (array(
752
-			         new GregorianDate($jd),
753
-			         new JulianDate($jd),
754
-			         new FrenchDate($jd),
755
-			         new JewishDate($jd),
756
-			         new HijriDate($jd),
757
-			         new JalaliDate($jd),
758
-		         ) as $anniv) {
752
+							 new GregorianDate($jd),
753
+							 new JulianDate($jd),
754
+							 new FrenchDate($jd),
755
+							 new JewishDate($jd),
756
+							 new HijriDate($jd),
757
+							 new JalaliDate($jd),
758
+						 ) as $anniv) {
759 759
 			// Build a SQL where clause to match anniversaries in the appropriate calendar.
760 760
 			$ind_sql =
761 761
 				"SELECT DISTINCT i_id AS xref, i_gedcom AS gedcom, d_type, d_day, d_month, d_year, d_fact" .
Please login to merge, or discard this patch.
app/Functions/FunctionsExport.php 2 patches
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -183,18 +183,18 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public static function exportGedcom(Tree $tree, $gedout, $exportOptions) {
185 185
 		switch ($exportOptions['privatize']) {
186
-			case 'gedadmin':
187
-				$access_level = Auth::PRIV_NONE;
188
-				break;
189
-			case 'user':
190
-				$access_level = Auth::PRIV_USER;
191
-				break;
192
-			case 'visitor':
193
-				$access_level = Auth::PRIV_PRIVATE;
194
-				break;
195
-			case 'none':
196
-				$access_level = Auth::PRIV_HIDE;
197
-				break;
186
+		case 'gedadmin':
187
+			$access_level = Auth::PRIV_NONE;
188
+			break;
189
+		case 'user':
190
+			$access_level = Auth::PRIV_USER;
191
+			break;
192
+		case 'visitor':
193
+			$access_level = Auth::PRIV_PRIVATE;
194
+			break;
195
+		case 'none':
196
+			$access_level = Auth::PRIV_HIDE;
197
+			break;
198 198
 		}
199 199
 
200 200
 		$head = self::gedcomHeader($tree);
@@ -251,15 +251,15 @@  discard block
 block discarded – undo
251 251
 
252 252
 		foreach ($rows as $row) {
253 253
 			switch ($row->type) {
254
-				case 'NOTE':
255
-					$record = Note::getInstance($row->xref, $tree, $row->gedcom);
256
-					break;
257
-				case 'REPO':
258
-					$record = Repository::getInstance($row->xref, $tree, $row->gedcom);
259
-					break;
260
-				default:
261
-					$record = GedcomRecord::getInstance($row->xref, $tree, $row->gedcom);
262
-					break;
254
+			case 'NOTE':
255
+				$record = Note::getInstance($row->xref, $tree, $row->gedcom);
256
+				break;
257
+			case 'REPO':
258
+				$record = Repository::getInstance($row->xref, $tree, $row->gedcom);
259
+				break;
260
+			default:
261
+				$record = GedcomRecord::getInstance($row->xref, $tree, $row->gedcom);
262
+				break;
263 263
 			}
264 264
 
265 265
 			$rec = $record->privatizeGedcom($access_level);
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Functions/FunctionsMedia.php 2 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,17 +34,17 @@
 block discarded – undo
34 34
 			$val = -1;
35 35
 		}
36 36
 		switch (substr($val, -1)) {
37
-			case 'g':
38
-			case 'G':
39
-				return (int) $val * 1024 * 1024 * 1024;
40
-			case 'm':
41
-			case 'M':
42
-				return (int) $val * 1024 * 1024;
43
-			case 'k':
44
-			case 'K':
45
-				return (int) $val * 1024;
46
-			default:
47
-				return (int) $val;
37
+		case 'g':
38
+		case 'G':
39
+			return (int) $val * 1024 * 1024 * 1024;
40
+		case 'm':
41
+		case 'M':
42
+			return (int) $val * 1024 * 1024;
43
+		case 'k':
44
+		case 'K':
45
+			return (int) $val * 1024;
46
+		default:
47
+			return (int) $val;
48 48
 		}
49 49
 	}
50 50
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Functions/FunctionsPrint.php 2 patches
Switch Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
 	public static function printPedigreePerson(Individual $person = null, $show_full = 1) {
51 51
 
52 52
 		switch ($show_full) {
53
-			case 0:
54
-				if ($person) {
55
-					echo Theme::theme()->individualBoxSmall($person);
56
-				} else {
57
-					echo Theme::theme()->individualBoxSmallEmpty();
58
-				}
59
-				break;
60
-			case 1:
61
-				if ($person) {
62
-					echo Theme::theme()->individualBox($person);
63
-				} else {
64
-					echo Theme::theme()->individualBoxEmpty();
65
-				}
66
-				break;
53
+		case 0:
54
+			if ($person) {
55
+				echo Theme::theme()->individualBoxSmall($person);
56
+			} else {
57
+				echo Theme::theme()->individualBoxSmallEmpty();
58
+			}
59
+			break;
60
+		case 1:
61
+			if ($person) {
62
+				echo Theme::theme()->individualBox($person);
63
+			} else {
64
+				echo Theme::theme()->individualBoxEmpty();
65
+			}
66
+			break;
67 67
 		}
68 68
 	}
69 69
 
@@ -259,25 +259,25 @@  discard block
 block discarded – undo
259 259
 					$age      = Date::getAge($parent->getBirthDate(), $birth_date, 2);
260 260
 					$deatdate = $parent->getDeathDate();
261 261
 					switch ($parent->getSex()) {
262
-						case 'F':
263
-							// Highlight mothers who die in childbirth or shortly afterwards
264
-							if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay() + 90) {
265
-								$html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>';
266
-							} else {
267
-								$html .= ' <span title="' . I18N::translate('Mother’s age') . '">' . $sex . $age . '</span>';
268
-							}
269
-							break;
270
-						case 'M':
271
-							// Highlight fathers who die before the birth
272
-							if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay()) {
273
-								$html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>';
274
-							} else {
275
-								$html .= ' <span title="' . I18N::translate('Father’s age') . '">' . $sex . $age . '</span>';
276
-							}
277
-							break;
278
-						default:
279
-							$html .= ' <span title="' . I18N::translate('Parent’s age') . '">' . $sex . $age . '</span>';
280
-							break;
262
+					case 'F':
263
+						// Highlight mothers who die in childbirth or shortly afterwards
264
+						if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay() + 90) {
265
+							$html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>';
266
+						} else {
267
+							$html .= ' <span title="' . I18N::translate('Mother’s age') . '">' . $sex . $age . '</span>';
268
+						}
269
+						break;
270
+					case 'M':
271
+						// Highlight fathers who die before the birth
272
+						if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay()) {
273
+							$html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>';
274
+						} else {
275
+							$html .= ' <span title="' . I18N::translate('Father’s age') . '">' . $sex . $age . '</span>';
276
+						}
277
+						break;
278
+					default:
279
+						$html .= ' <span title="' . I18N::translate('Parent’s age') . '">' . $sex . $age . '</span>';
280
+						break;
281 281
 					}
282 282
 				}
283 283
 			}
@@ -578,33 +578,33 @@  discard block
 block discarded – undo
578 578
 
579 579
 		// -- Add from pick list
580 580
 		switch ($type) {
581
-			case "INDI":
582
-				$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
583
-				$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
584
-				$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
585
-				break;
586
-			case "FAM":
587
-				$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
588
-				$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
589
-				$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
590
-				break;
591
-			case "SOUR":
592
-				$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
593
-				$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
594
-				$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
595
-				break;
596
-			case "NOTE":
597
-				$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
598
-				$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
599
-				$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
600
-				break;
601
-			case "REPO":
602
-				$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
603
-				$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
604
-				$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
605
-				break;
606
-			default:
607
-				return;
581
+		case "INDI":
582
+			$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
583
+			$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
584
+			$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
585
+			break;
586
+		case "FAM":
587
+			$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
588
+			$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
589
+			$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
590
+			break;
591
+		case "SOUR":
592
+			$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
593
+			$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
594
+			$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
595
+			break;
596
+		case "NOTE":
597
+			$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
598
+			$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
599
+			$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
600
+			break;
601
+		case "REPO":
602
+			$addfacts    = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
603
+			$uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
604
+			$quickfacts  = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
605
+			break;
606
+		default:
607
+			return;
608 608
 		}
609 609
 		$addfacts            = array_merge(self::checkFactUnique($uniquefacts, $usedfacts, $type), $addfacts);
610 610
 		$quickfacts          = array_intersect($quickfacts, $addfacts);
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.
app/Module/CensusAssistantModule.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -425,10 +425,10 @@  discard block
 block discarded – undo
425 425
 	 * @return string
426 426
 	 */
427 427
 	public static function censusNavigatorFamily(CensusInterface $census, Family $family, Individual $head) {
428
-		$headImg2  = '<i class="icon-button_head" title="' . I18N::translate('Click to choose individual as head of family.') . '"></i>';
428
+		$headImg2 = '<i class="icon-button_head" title="' . I18N::translate('Click to choose individual as head of family.') . '"></i>';
429 429
 
430 430
 		foreach ($family->getSpouses() as $spouse) {
431
-			$menu  = new Menu(Functions::getCloseRelationshipName($head, $spouse));
431
+			$menu = new Menu(Functions::getCloseRelationshipName($head, $spouse));
432 432
 			foreach ($spouse->getChildFamilies() as $grandparents) {
433 433
 				foreach ($grandparents->getSpouses() as $grandparent) {
434 434
 					$submenu = new Menu(
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 		}
464 464
 
465 465
 		foreach ($family->getChildren() as $child) {
466
-			$menu  = new Menu(Functions::getCloseRelationshipName($head, $child));
466
+			$menu = new Menu(Functions::getCloseRelationshipName($head, $child));
467 467
 			foreach ($child->getSpouseFamilies() as $spouse_family) {
468 468
 				foreach ($spouse_family->getSpouses() as $spouse_family_spouse) {
469 469
 					if ($spouse_family_spouse != $child) {
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * webtrees: online genealogy
4
- * Copyright (C) 2016 webtrees development team
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
- */
3
+	 * webtrees: online genealogy
4
+	 * Copyright (C) 2016 webtrees development team
5
+	 * This program is free software: you can redistribute it and/or modify
6
+	 * it under the terms of the GNU General Public License as published by
7
+	 * the Free Software Foundation, either version 3 of the License, or
8
+	 * (at your option) any later version.
9
+	 * This program is distributed in the hope that it will be useful,
10
+	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+	 * GNU General Public License for more details.
13
+	 * You should have received a copy of the GNU General Public License
14
+	 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+	 */
16 16
 namespace Fisharebest\Webtrees;
17 17
 
18 18
 use Fisharebest\Webtrees\Theme\AdministrationTheme;
Please login to merge, or discard this patch.