Completed
Push — 1.7 ( ce7091...0d97cf )
by Greg
14:14 queued 07:41
created
app/Module/SiteMapModule.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,17 +30,20 @@  discard block
 block discarded – undo
30 30
 /**
31 31
  * Class SiteMapModule
32 32
  */
33
-class SiteMapModule extends AbstractModule implements ModuleConfigInterface {
33
+class SiteMapModule extends AbstractModule implements ModuleConfigInterface
34
+{
34 35
 	const RECORDS_PER_VOLUME = 500; // Keep sitemap files small, for memory, CPU and max_allowed_packet limits.
35 36
 	const CACHE_LIFE         = 1209600; // Two weeks
36 37
 
37 38
 	/** {@inheritdoc} */
38
-	public function getTitle() {
39
+	public function getTitle()
40
+	{
39 41
 		return /* I18N: Name of a module - see http://en.wikipedia.org/wiki/Sitemaps */ I18N::translate('Sitemaps');
40 42
 	}
41 43
 
42 44
 	/** {@inheritdoc} */
43
-	public function getDescription() {
45
+	public function getDescription()
46
+	{
44 47
 		return /* I18N: Description of the “Sitemaps” module */ I18N::translate('Generate sitemap files for search engines.');
45 48
 	}
46 49
 
@@ -50,7 +53,8 @@  discard block
 block discarded – undo
50 53
 	 *
51 54
 	 * @param string $mod_action
52 55
 	 */
53
-	public function modAction($mod_action) {
56
+	public function modAction($mod_action)
57
+	{
54 58
 		switch ($mod_action) {
55 59
 		case 'admin':
56 60
 			$this->admin();
@@ -68,7 +72,8 @@  discard block
 block discarded – undo
68 72
 	 *
69 73
 	 * @param string $file
70 74
 	 */
71
-	private function generate($file) {
75
+	private function generate($file)
76
+	{
72 77
 		if ($file == 'sitemap.xml') {
73 78
 			$this->generateIndex();
74 79
 		} elseif (preg_match('/^sitemap-(\d+)-([isrmn])-(\d+).xml$/', $file, $match)) {
@@ -82,7 +87,8 @@  discard block
 block discarded – undo
82 87
 	 * The index file contains references to all the other files.
83 88
 	 * These files are the same for visitors/users/admins.
84 89
 	 */
85
-	private function generateIndex() {
90
+	private function generateIndex()
91
+	{
86 92
 		// Check the cache
87 93
 		$timestamp = $this->getSetting('sitemap.timestamp');
88 94
 		if ($timestamp > WT_TIMESTAMP - self::CACHE_LIFE) {
@@ -150,7 +156,8 @@  discard block
 block discarded – undo
150 156
 	 * @param string $rec_type
151 157
 	 * @param string $volume
152 158
 	 */
153
-	private function generateFile($ged_id, $rec_type, $volume) {
159
+	private function generateFile($ged_id, $rec_type, $volume)
160
+	{
154 161
 		$tree = Tree::findById($ged_id);
155 162
 		// Check the cache
156 163
 		$timestamp = $this->getSetting('sitemap-' . $ged_id . '-' . $rec_type . '-' . $volume . '.timestamp');
@@ -271,7 +278,8 @@  discard block
 block discarded – undo
271 278
 	/**
272 279
 	 * Edit the configuration
273 280
 	 */
274
-	private function admin() {
281
+	private function admin()
282
+	{
275 283
 		$controller = new PageController;
276 284
 		$controller
277 285
 			->restrictAccess(Auth::isAdmin())
@@ -339,7 +347,8 @@  discard block
 block discarded – undo
339 347
 	}
340 348
 
341 349
 	/** {@inheritdoc} */
342
-	public function getConfigLink() {
350
+	public function getConfigLink()
351
+	{
343 352
 		return 'module.php?mod=' . $this->getName() . '&mod_action=admin';
344 353
 	}
345 354
 }
Please login to merge, or discard this patch.
app/Module/FamilyTreeNewsModule.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
 /**
26 26
  * Class FamilyTreeNewsModule
27 27
  */
28
-class FamilyTreeNewsModule extends AbstractModule implements ModuleBlockInterface {
28
+class FamilyTreeNewsModule extends AbstractModule implements ModuleBlockInterface
29
+{
29 30
 	// How to update the database schema for this module
30 31
 	const SCHEMA_TARGET_VERSION   = 3;
31 32
 	const SCHEMA_SETTING_NAME     = 'NB_SCHEMA_VERSION';
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
 	 *
37 38
 	 * @param string $directory Where is this module installed
38 39
 	 */
39
-	public function __construct($directory) {
40
+	public function __construct($directory)
41
+	{
40 42
 		parent::__construct($directory);
41 43
 
42 44
 		// Create/update the database tables.
@@ -49,7 +51,8 @@  discard block
 block discarded – undo
49 51
 	 *
50 52
 	 * @return string
51 53
 	 */
52
-	public function getTitle() {
54
+	public function getTitle()
55
+	{
53 56
 		return /* I18N: Name of a module */ I18N::translate('News');
54 57
 	}
55 58
 
@@ -58,7 +61,8 @@  discard block
 block discarded – undo
58 61
 	 *
59 62
 	 * @return string
60 63
 	 */
61
-	public function getDescription() {
64
+	public function getDescription()
65
+	{
62 66
 		return /* I18N: Description of the “News” module */ I18N::translate('Family news and site announcements.');
63 67
 	}
64 68
 
@@ -71,7 +75,8 @@  discard block
 block discarded – undo
71 75
 	 *
72 76
 	 * @return string
73 77
 	 */
74
-	public function getBlock($block_id, $template = true, $cfg = array()) {
78
+	public function getBlock($block_id, $template = true, $cfg = array())
79
+	{
75 80
 		global $ctype, $WT_TREE;
76 81
 
77 82
 		switch (Filter::get('action')) {
@@ -145,17 +150,20 @@  discard block
 block discarded – undo
145 150
 	}
146 151
 
147 152
 	/** {@inheritdoc} */
148
-	public function loadAjax() {
153
+	public function loadAjax()
154
+	{
149 155
 		return false;
150 156
 	}
151 157
 
152 158
 	/** {@inheritdoc} */
153
-	public function isUserBlock() {
159
+	public function isUserBlock()
160
+	{
154 161
 		return false;
155 162
 	}
156 163
 
157 164
 	/** {@inheritdoc} */
158
-	public function isGedcomBlock() {
165
+	public function isGedcomBlock()
166
+	{
159 167
 		return true;
160 168
 	}
161 169
 
@@ -164,6 +172,7 @@  discard block
 block discarded – undo
164 172
 	 *
165 173
 	 * @param int $block_id
166 174
 	 */
167
-	public function configureBlock($block_id) {
175
+	public function configureBlock($block_id)
176
+	{
168 177
 	}
169 178
 }
Please login to merge, or discard this patch.
app/Module/SourcesTabModule.php 1 patch
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,39 +25,46 @@  discard block
 block discarded – undo
25 25
 /**
26 26
  * Class SourcesTabModule
27 27
  */
28
-class SourcesTabModule extends AbstractModule implements ModuleTabInterface {
28
+class SourcesTabModule extends AbstractModule implements ModuleTabInterface
29
+{
29 30
 	/** @var Fact[] All facts belonging to this source. */
30 31
 	private $facts;
31 32
 
32 33
 	/** {@inheritdoc} */
33
-	public function getTitle() {
34
+	public function getTitle()
35
+	{
34 36
 		return /* I18N: Name of a module */ I18N::translate('Sources');
35 37
 	}
36 38
 
37 39
 	/** {@inheritdoc} */
38
-	public function getDescription() {
40
+	public function getDescription()
41
+	{
39 42
 		return /* I18N: Description of the “Sources” module */ I18N::translate('A tab showing the sources linked to an individual.');
40 43
 	}
41 44
 
42 45
 	/** {@inheritdoc} */
43
-	public function defaultTabOrder() {
46
+	public function defaultTabOrder()
47
+	{
44 48
 		return 30;
45 49
 	}
46 50
 
47 51
 	/** {@inheritdoc} */
48
-	public function hasTabContent() {
52
+	public function hasTabContent()
53
+	{
49 54
 		global $WT_TREE;
50 55
 
51 56
 		return Auth::isEditor($WT_TREE) || $this->getFactsWithSources();
52 57
 	}
53 58
 
54 59
 	/** {@inheritdoc} */
55
-	public function isGrayedOut() {
60
+	public function isGrayedOut()
61
+	{
56 62
 		return !$this->getFactsWithSources();
57 63
 	}
58 64
 
59 65
 	/** {@inheritdoc} */
60
-	public function getTabContent() {
66
+	public function getTabContent()
67
+	{
61 68
 		global $controller;
62 69
 
63 70
 		ob_start();
@@ -113,7 +120,8 @@  discard block
 block discarded – undo
113 120
 	 *
114 121
 	 * @return Fact[]
115 122
 	 */
116
-	private function getFactsWithSources() {
123
+	private function getFactsWithSources()
124
+	{
117 125
 		global $controller;
118 126
 
119 127
 		if ($this->facts === null) {
@@ -138,12 +146,14 @@  discard block
 block discarded – undo
138 146
 	}
139 147
 
140 148
 	/** {@inheritdoc} */
141
-	public function canLoadAjax() {
149
+	public function canLoadAjax()
150
+	{
142 151
 		return !Auth::isSearchEngine(); // Search engines cannot use AJAX
143 152
 	}
144 153
 
145 154
 	/** {@inheritdoc} */
146
-	public function getPreLoadContent() {
155
+	public function getPreLoadContent()
156
+	{
147 157
 		return '';
148 158
 	}
149 159
 }
Please login to merge, or discard this patch.
app/Module/FamiliesSidebarModule.php 1 patch
Braces   +22 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,14 +26,17 @@  discard block
 block discarded – undo
26 26
 /**
27 27
  * Class FamiliesSidebarModule
28 28
  */
29
-class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInterface {
29
+class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInterface
30
+{
30 31
 	/** {@inheritdoc} */
31
-	public function getTitle() {
32
+	public function getTitle()
33
+	{
32 34
 		return /* I18N: Name of a module/sidebar */ I18N::translate('Family list');
33 35
 	}
34 36
 
35 37
 	/** {@inheritdoc} */
36
-	public function getDescription() {
38
+	public function getDescription()
39
+	{
37 40
 		return /* I18N: Description of the “Families” module */ I18N::translate('A sidebar showing an alphabetic list of all the families in the family tree.');
38 41
 	}
39 42
 
@@ -43,7 +46,8 @@  discard block
 block discarded – undo
43 46
 	 *
44 47
 	 * @param string $mod_action
45 48
 	 */
46
-	public function modAction($mod_action) {
49
+	public function modAction($mod_action)
50
+	{
47 51
 		switch ($mod_action) {
48 52
 		case 'ajax':
49 53
 			header('Content-Type: text/html; charset=UTF-8');
@@ -56,17 +60,20 @@  discard block
 block discarded – undo
56 60
 	}
57 61
 
58 62
 	/** {@inheritdoc} */
59
-	public function defaultSidebarOrder() {
63
+	public function defaultSidebarOrder()
64
+	{
60 65
 		return 50;
61 66
 	}
62 67
 
63 68
 	/** {@inheritdoc} */
64
-	public function hasSidebarContent() {
69
+	public function hasSidebarContent()
70
+	{
65 71
 		return true;
66 72
 	}
67 73
 
68 74
 	/** {@inheritdoc} */
69
-	public function getSidebarAjaxContent() {
75
+	public function getSidebarAjaxContent()
76
+	{
70 77
 		global $WT_TREE;
71 78
 
72 79
 		$alpha   = Filter::get('alpha'); // All surnames beginning with this letter where "@"=unknown and ","=none
@@ -89,7 +96,8 @@  discard block
 block discarded – undo
89 96
 	 *
90 97
 	 * @return string
91 98
 	 */
92
-	public function getSidebarContent() {
99
+	public function getSidebarContent()
100
+	{
93 101
 		global $controller, $WT_TREE;
94 102
 
95 103
 		// Fetch a list of the initial letters of all surnames in the database
@@ -181,7 +189,8 @@  discard block
 block discarded – undo
181 189
 	 *
182 190
 	 * @return string
183 191
 	 */
184
-	private function getAlphaSurnames(Tree $tree, $alpha) {
192
+	private function getAlphaSurnames(Tree $tree, $alpha)
193
+	{
185 194
 		$surnames = QueryName::surnames($tree, '', $alpha, true, true);
186 195
 		$out      = '<ul>';
187 196
 		foreach (array_keys($surnames) as $surname) {
@@ -203,7 +212,8 @@  discard block
 block discarded – undo
203 212
 	 *
204 213
 	 * @return string
205 214
 	 */
206
-	public function getSurnameFams(Tree $tree, $alpha, $surname) {
215
+	public function getSurnameFams(Tree $tree, $alpha, $surname)
216
+	{
207 217
 		$families = QueryName::families($tree, $surname, $alpha, '', true);
208 218
 		$out      = '<ul>';
209 219
 		foreach ($families as $family) {
@@ -231,7 +241,8 @@  discard block
 block discarded – undo
231 241
 	 *
232 242
 	 * @return string
233 243
 	 */
234
-	private function search(Tree $tree, $query) {
244
+	private function search(Tree $tree, $query)
245
+	{
235 246
 		if (strlen($query) < 2) {
236 247
 			return '';
237 248
 		}
Please login to merge, or discard this patch.
app/Module/StoriesModule.php 1 patch
Braces   +39 added lines, -19 removed lines patch added patch discarded remove patch
@@ -32,12 +32,14 @@  discard block
 block discarded – undo
32 32
  */
33 33
 class StoriesModule extends AbstractModule implements ModuleTabInterface, ModuleConfigInterface, ModuleMenuInterface {
34 34
 	/** {@inheritdoc} */
35
-	public function getTitle() {
35
+	public function getTitle()
36
+	{
36 37
 		return /* I18N: Name of a module */ I18N::translate('Stories');
37 38
 	}
38 39
 
39 40
 	/** {@inheritdoc} */
40
-	public function getDescription() {
41
+	public function getDescription()
42
+	{
41 43
 		return /* I18N: Description of the “Stories” module */ I18N::translate('Add narrative stories to individuals in the family tree.');
42 44
 	}
43 45
 
@@ -47,7 +49,8 @@  discard block
 block discarded – undo
47 49
 	 *
48 50
 	 * @param string $mod_action
49 51
 	 */
50
-	public function modAction($mod_action) {
52
+	public function modAction($mod_action)
53
+	{
51 54
 		switch ($mod_action) {
52 55
 		case 'admin_edit':
53 56
 			$this->edit();
@@ -68,17 +71,20 @@  discard block
 block discarded – undo
68 71
 	}
69 72
 
70 73
 	/** {@inheritdoc} */
71
-	public function getConfigLink() {
74
+	public function getConfigLink()
75
+	{
72 76
 		return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin_config';
73 77
 	}
74 78
 
75 79
 	/** {@inheritdoc} */
76
-	public function defaultTabOrder() {
80
+	public function defaultTabOrder()
81
+	{
77 82
 		return 55;
78 83
 	}
79 84
 
80 85
 	/** {@inheritdoc} */
81
-	public function getTabContent() {
86
+	public function getTabContent()
87
+	{
82 88
 		global $controller, $WT_TREE;
83 89
 
84 90
 		$block_ids =
@@ -117,12 +123,14 @@  discard block
 block discarded – undo
117 123
 	}
118 124
 
119 125
 	/** {@inheritdoc} */
120
-	public function hasTabContent() {
126
+	public function hasTabContent()
127
+	{
121 128
 		return $this->getTabContent() != '';
122 129
 	}
123 130
 
124 131
 	/** {@inheritdoc} */
125
-	public function isGrayedOut() {
132
+	public function isGrayedOut()
133
+	{
126 134
 		global $controller;
127 135
 
128 136
 		$count_of_stories =
@@ -142,19 +150,22 @@  discard block
 block discarded – undo
142 150
 	}
143 151
 
144 152
 	/** {@inheritdoc} */
145
-	public function canLoadAjax() {
153
+	public function canLoadAjax()
154
+	{
146 155
 		return false;
147 156
 	}
148 157
 
149 158
 	/** {@inheritdoc} */
150
-	public function getPreLoadContent() {
159
+	public function getPreLoadContent()
160
+	{
151 161
 		return '';
152 162
 	}
153 163
 
154 164
 	/**
155 165
 	 * Show and process a form to edit a story.
156 166
 	 */
157
-	private function edit() {
167
+	private function edit()
168
+	{
158 169
 		global $WT_TREE;
159 170
 
160 171
 		if (Auth::isEditor($WT_TREE)) {
@@ -283,7 +294,8 @@  discard block
 block discarded – undo
283 294
 	/**
284 295
 	 * Respond to a request to delete a story.
285 296
 	 */
286
-	private function delete() {
297
+	private function delete()
298
+	{
287 299
 		global $WT_TREE;
288 300
 
289 301
 		if (Auth::isEditor($WT_TREE)) {
@@ -305,7 +317,8 @@  discard block
 block discarded – undo
305 317
 	/**
306 318
 	 * The admin view - list, create, edit, delete stories.
307 319
 	 */
308
-	private function config() {
320
+	private function config()
321
+	{
309 322
 		global $WT_TREE;
310 323
 
311 324
 		$controller = new PageController;
@@ -389,8 +402,11 @@  discard block
 block discarded – undo
389 402
 						<a href="<?php echo $individual->getHtmlUrl(); ?>#stories">
390 403
 							<?php echo $individual->getFullName(); ?>
391 404
 						</a>
392
-						<?php else: ?>
393
-							<?php echo $story->xref; ?>
405
+						<?php else {
406
+    : ?>
407
+							<?php echo $story->xref;
408
+}
409
+?>
394 410
 						<?php endif; ?>
395 411
 						</td>
396 412
 						<td>
@@ -416,7 +432,8 @@  discard block
 block discarded – undo
416 432
 	/**
417 433
 	 * Show the list of stories
418 434
 	 */
419
-	private function showList() {
435
+	private function showList()
436
+	{
420 437
 		global $controller, $WT_TREE;
421 438
 
422 439
 		$controller = new PageController;
@@ -482,7 +499,8 @@  discard block
 block discarded – undo
482 499
 	 *
483 500
 	 * @return int
484 501
 	 */
485
-	public function defaultMenuOrder() {
502
+	public function defaultMenuOrder()
503
+	{
486 504
 		return 30;
487 505
 	}
488 506
 
@@ -493,7 +511,8 @@  discard block
 block discarded – undo
493 511
 	 *
494 512
 	 * @return int
495 513
 	 */
496
-	public function defaultAccessLevel() {
514
+	public function defaultAccessLevel()
515
+	{
497 516
 		return Auth::PRIV_HIDE;
498 517
 	}
499 518
 
@@ -502,7 +521,8 @@  discard block
 block discarded – undo
502 521
 	 *
503 522
 	 * @return Menu|null
504 523
 	 */
505
-	public function getMenu() {
524
+	public function getMenu()
525
+	{
506 526
 		$menu = new Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&amp;mod_action=show_list', 'menu-story');
507 527
 
508 528
 		return $menu;
Please login to merge, or discard this patch.
app/Module/CompactTreeChartModule.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,13 +23,15 @@  discard block
 block discarded – undo
23 23
 /**
24 24
  * Class CompactTreeChartModule
25 25
  */
26
-class CompactTreeChartModule extends AbstractModule implements ModuleChartInterface {
26
+class CompactTreeChartModule extends AbstractModule implements ModuleChartInterface
27
+{
27 28
 	/**
28 29
 	 * How should this module be labelled on tabs, menus, etc.?
29 30
 	 *
30 31
 	 * @return string
31 32
 	 */
32
-	public function getTitle() {
33
+	public function getTitle()
34
+	{
33 35
 		return /* I18N: Name of a module/chart */ I18N::translate('Compact tree');
34 36
 	}
35 37
 
@@ -38,7 +40,8 @@  discard block
 block discarded – undo
38 40
 	 *
39 41
 	 * @return string
40 42
 	 */
41
-	public function getDescription() {
43
+	public function getDescription()
44
+	{
42 45
 		return /* I18N: Description of the “CompactTreeChart” module */ I18N::translate('A chart of an individual’s ancestors, as a compact tree.');
43 46
 	}
44 47
 
@@ -49,7 +52,8 @@  discard block
 block discarded – undo
49 52
 	 *
50 53
 	 * @return int
51 54
 	 */
52
-	public function defaultAccessLevel() {
55
+	public function defaultAccessLevel()
56
+	{
53 57
 		return Auth::PRIV_PRIVATE;
54 58
 	}
55 59
 
@@ -58,7 +62,8 @@  discard block
 block discarded – undo
58 62
 	 *
59 63
 	 * @return Menu|null
60 64
 	 */
61
-	public function getChartMenu(Individual $individual) {
65
+	public function getChartMenu(Individual $individual)
66
+	{
62 67
 		return new Menu(
63 68
 			$this->getTitle(),
64 69
 			'compact.php?rootid=' . $individual->getXref() . '&amp;ged=' . $individual->getTree()->getNameUrl(),
@@ -72,7 +77,8 @@  discard block
 block discarded – undo
72 77
 	 *
73 78
 	 * @return Menu|null
74 79
 	 */
75
-	public function getBoxChartMenu(Individual $individual) {
80
+	public function getBoxChartMenu(Individual $individual)
81
+	{
76 82
 		return $this->getChartMenu($individual);
77 83
 	}
78 84
 }
Please login to merge, or discard this patch.
app/Module/IndividualSidebarModule.php 1 patch
Braces   +22 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,14 +27,17 @@  discard block
 block discarded – undo
27 27
 /**
28 28
  * Class IndividualSidebarModule
29 29
  */
30
-class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInterface {
30
+class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInterface
31
+{
31 32
 	/** {@inheritdoc} */
32
-	public function getTitle() {
33
+	public function getTitle()
34
+	{
33 35
 		return /* I18N: Name of a module */ I18N::translate('Individual list');
34 36
 	}
35 37
 
36 38
 	/** {@inheritdoc} */
37
-	public function getDescription() {
39
+	public function getDescription()
40
+	{
38 41
 		return /* I18N: Description of “Individuals” module */ I18N::translate('A sidebar showing an alphabetic list of all the individuals in the family tree.');
39 42
 	}
40 43
 
@@ -44,7 +47,8 @@  discard block
 block discarded – undo
44 47
 	 *
45 48
 	 * @param string $mod_action
46 49
 	 */
47
-	public function modAction($mod_action) {
50
+	public function modAction($mod_action)
51
+	{
48 52
 		switch ($mod_action) {
49 53
 		case 'ajax':
50 54
 			header('Content-Type: text/html; charset=UTF-8');
@@ -57,17 +61,20 @@  discard block
 block discarded – undo
57 61
 	}
58 62
 
59 63
 	/** {@inheritdoc} */
60
-	public function defaultSidebarOrder() {
64
+	public function defaultSidebarOrder()
65
+	{
61 66
 		return 40;
62 67
 	}
63 68
 
64 69
 	/** {@inheritdoc} */
65
-	public function hasSidebarContent() {
70
+	public function hasSidebarContent()
71
+	{
66 72
 		return !Auth::isSearchEngine();
67 73
 	}
68 74
 
69 75
 	/** {@inheritdoc} */
70
-	public function getSidebarAjaxContent() {
76
+	public function getSidebarAjaxContent()
77
+	{
71 78
 		global $WT_TREE;
72 79
 
73 80
 		$alpha   = Filter::get('alpha'); // All surnames beginning with this letter where "@"=unknown and ","=none
@@ -90,7 +97,8 @@  discard block
 block discarded – undo
90 97
 	 *
91 98
 	 * @return string
92 99
 	 */
93
-	public function getSidebarContent() {
100
+	public function getSidebarContent()
101
+	{
94 102
 		global $controller, $WT_TREE;
95 103
 
96 104
 		// Fetch a list of the initial letters of all surnames in the database
@@ -182,7 +190,8 @@  discard block
 block discarded – undo
182 190
 	 *
183 191
 	 * @return string
184 192
 	 */
185
-	private function getAlphaSurnames(Tree $tree, $alpha) {
193
+	private function getAlphaSurnames(Tree $tree, $alpha)
194
+	{
186 195
 		$surnames = QueryName::surnames($tree, '', $alpha, true, false);
187 196
 		$out      = '<ul>';
188 197
 		foreach (array_keys($surnames) as $surname) {
@@ -204,7 +213,8 @@  discard block
 block discarded – undo
204 213
 	 *
205 214
 	 * @return string
206 215
 	 */
207
-	private function getSurnameIndis(Tree $tree, $alpha, $surname) {
216
+	private function getSurnameIndis(Tree $tree, $alpha, $surname)
217
+	{
208 218
 		$indis = QueryName::individuals($tree, $surname, $alpha, '', true, false);
209 219
 		$out   = '<ul>';
210 220
 		foreach ($indis as $person) {
@@ -232,7 +242,8 @@  discard block
 block discarded – undo
232 242
 	 *
233 243
 	 * @return string
234 244
 	 */
235
-	private function search(Tree $tree, $query) {
245
+	private function search(Tree $tree, $query)
246
+	{
236 247
 		if (strlen($query) < 2) {
237 248
 			return '';
238 249
 		}
Please login to merge, or discard this patch.
app/Module/PedigreeReportModule.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,15 +22,18 @@  discard block
 block discarded – undo
22 22
 /**
23 23
  * Class PedigreeReportModule
24 24
  */
25
-class PedigreeReportModule extends AbstractModule implements ModuleReportInterface {
25
+class PedigreeReportModule extends AbstractModule implements ModuleReportInterface
26
+{
26 27
 	/** {@inheritdoc} */
27
-	public function getTitle() {
28
+	public function getTitle()
29
+	{
28 30
 		// This text also appears in the .XML file - update both together
29 31
 		return /* I18N: Name of a report */ I18N::translate('Pedigree');
30 32
 	}
31 33
 
32 34
 	/** {@inheritdoc} */
33
-	public function getDescription() {
35
+	public function getDescription()
36
+	{
34 37
 		// This text also appears in the .XML file - update both together
35 38
 		return /* I18N: Description of the “Pedigree” module */ I18N::translate('A report of an individual’s ancestors, formatted as a tree.');
36 39
 	}
@@ -42,7 +45,8 @@  discard block
 block discarded – undo
42 45
 	 *
43 46
 	 * @return int
44 47
 	 */
45
-	public function defaultAccessLevel() {
48
+	public function defaultAccessLevel()
49
+	{
46 50
 		return Auth::PRIV_PRIVATE;
47 51
 	}
48 52
 
@@ -51,7 +55,8 @@  discard block
 block discarded – undo
51 55
 	 *
52 56
 	 * @return Menu
53 57
 	 */
54
-	public function getReportMenu() {
58
+	public function getReportMenu()
59
+	{
55 60
 		global $controller, $WT_TREE;
56 61
 
57 62
 		return new Menu(
Please login to merge, or discard this patch.
app/Module/FrequentlyAskedQuestionsModule.php 1 patch
Braces   +26 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,12 +30,14 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMenuInterface, ModuleConfigInterface {
32 32
 	/** {@inheritdoc} */
33
-	public function getTitle() {
33
+	public function getTitle()
34
+	{
34 35
 		return /* I18N: Name of a module. Abbreviation for “Frequently Asked Questions” */ I18N::translate('FAQ');
35 36
 	}
36 37
 
37 38
 	/** {@inheritdoc} */
38
-	public function getDescription() {
39
+	public function getDescription()
40
+	{
39 41
 		return /* I18N: Description of the “FAQ” module */ I18N::translate('A list of frequently asked questions and answers.');
40 42
 	}
41 43
 
@@ -45,7 +47,8 @@  discard block
 block discarded – undo
45 47
 	 *
46 48
 	 * @param string $mod_action
47 49
 	 */
48
-	public function modAction($mod_action) {
50
+	public function modAction($mod_action)
51
+	{
49 52
 		switch ($mod_action) {
50 53
 		case 'admin_config':
51 54
 			$this->config();
@@ -86,14 +89,16 @@  discard block
 block discarded – undo
86 89
 	}
87 90
 
88 91
 	/** {@inheritdoc} */
89
-	public function getConfigLink() {
92
+	public function getConfigLink()
93
+	{
90 94
 		return 'module.php?mod=' . $this->getName() . '&amp;mod_action=admin_config';
91 95
 	}
92 96
 
93 97
 	/**
94 98
 	 * Action from the configuration page
95 99
 	 */
96
-	private function editSave() {
100
+	private function editSave()
101
+	{
97 102
 		if (Filter::checkCsrf()) {
98 103
 			$block_id = Filter::postInteger('block_id');
99 104
 			if ($block_id) {
@@ -125,7 +130,8 @@  discard block
 block discarded – undo
125 130
 	/**
126 131
 	 * Action from the configuration page
127 132
 	 */
128
-	private function edit() {
133
+	private function edit()
134
+	{
129 135
 		global $WT_TREE;
130 136
 
131 137
 		$controller = new PageController;
@@ -241,7 +247,8 @@  discard block
 block discarded – undo
241 247
 	/**
242 248
 	 * Delete an FAQ.
243 249
 	 */
244
-	private function delete() {
250
+	private function delete()
251
+	{
245 252
 		$block_id = Filter::getInteger('block_id');
246 253
 
247 254
 		Database::prepare(
@@ -256,7 +263,8 @@  discard block
 block discarded – undo
256 263
 	/**
257 264
 	 * Move an FAQ up the list.
258 265
 	 */
259
-	private function moveup() {
266
+	private function moveup()
267
+	{
260 268
 		$block_id = Filter::getInteger('block_id');
261 269
 
262 270
 		$block_order = Database::prepare(
@@ -294,7 +302,8 @@  discard block
 block discarded – undo
294 302
 	/**
295 303
 	 * Move an FAQ down the list.
296 304
 	 */
297
-	private function movedown() {
305
+	private function movedown()
306
+	{
298 307
 		$block_id = Filter::get('block_id');
299 308
 
300 309
 		$block_order = Database::prepare(
@@ -334,7 +343,8 @@  discard block
 block discarded – undo
334 343
 	/**
335 344
 	 * Show a list of FAQs
336 345
 	 */
337
-	private function show() {
346
+	private function show()
347
+	{
338 348
 		global $controller, $WT_TREE;
339 349
 
340 350
 		$controller = new PageController;
@@ -396,7 +406,8 @@  discard block
 block discarded – undo
396 406
 	/**
397 407
 	 * Provide a form to manage the FAQs.
398 408
 	 */
399
-	private function config() {
409
+	private function config()
410
+	{
400 411
 		global $WT_TREE;
401 412
 
402 413
 		$controller = new PageController;
@@ -509,7 +520,8 @@  discard block
 block discarded – undo
509 520
 	 *
510 521
 	 * @return int
511 522
 	 */
512
-	public function defaultMenuOrder() {
523
+	public function defaultMenuOrder()
524
+	{
513 525
 		return 40;
514 526
 	}
515 527
 
@@ -518,7 +530,8 @@  discard block
 block discarded – undo
518 530
 	 *
519 531
 	 * @return Menu|null
520 532
 	 */
521
-	public function getMenu() {
533
+	public function getMenu()
534
+	{
522 535
 		global $WT_TREE;
523 536
 
524 537
 		$faqs = Database::prepare(
Please login to merge, or discard this patch.