Passed
Branch feature/2.0 (2da243)
by Jonathan
05:05
created
src/Webtrees/Module/Sosa/Model/SosaCalculator.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,8 +114,12 @@
 block discarded – undo
114 114
         $this->flushTmpSosaTable();
115 115
         
116 116
         if($fam = $indi->getPrimaryChildFamily()) {
117
-            if($husb = $fam->getHusband()) $this->addNode($husb, 2 * $sosa);
118
-            if($wife = $fam->getWife()) $this->addNode($wife, 2 * $sosa + 1);
117
+            if($husb = $fam->getHusband()) {
118
+            	$this->addNode($husb, 2 * $sosa);
119
+            }
120
+            if($wife = $fam->getWife()) {
121
+            	$this->addNode($wife, 2 * $sosa + 1);
122
+            }
119 123
         }
120 124
     }
121 125
     
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/SosaListController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -431,8 +431,7 @@  discard block
 block discarded – undo
431 431
                         ) {
432 432
                         $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex();
433 433
                     }
434
-                }
435
-                else {
434
+                } else {
436 435
                     $birth_dates[0]=new Date('');
437 436
                 }
438 437
                 if ($death_dates = $person->getAllDeathDates()) {
@@ -443,8 +442,7 @@  discard block
 block discarded – undo
443 442
                         ) {
444 443
                         $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex();
445 444
                     }
446
-                }
447
-                else {
445
+                } else {
448 446
                     $death_dates[0] = new Date('');
449 447
                 }
450 448
                 $age = Date::getAge($birth_dates[0], $death_dates[0], 0);
Please login to merge, or discard this patch.
src/Webtrees/Module/Hooks/Views/AdminConfigView.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,10 @@
 block discarded – undo
66 66
 								<td><?php echo (($hook->status)=='enabled'); ?></td>
67 67
 								<td><?php echo $hook->hook; ?></td>
68 68
 								<td><?php echo $hook->context; ?></td>
69
-								<td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
69
+								<td><?php if($mod = Module::getModuleByName($hook->module)) {
70
+	echo $mod->getTitle();
71
+}
72
+?></td>
70 73
 								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
71 74
 								<td><?php echo $hook->priority; ?></td>
72 75
 							</tr>
Please login to merge, or discard this patch.
src/Webtrees/Module/ModuleManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,13 +72,11 @@
 block discarded – undo
72 72
     					// as they could change by the next call to the method
73 73
     					return false;
74 74
     				}
75
-    			}
76
-    			else {
75
+    			} else {
77 76
     				$this->modules_list[$moduleName] = TRUE;
78 77
     				return true;
79 78
     			}
80
-    		}
81
-    		else {
79
+    		} else {
82 80
     			$this->modules_list[$moduleName] = FALSE;
83 81
     		}
84 82
     	}
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Model/GeoAnalysis.php 1 patch
Braces   +10 added lines, -16 removed lines patch added patch discarded remove patch
@@ -217,39 +217,34 @@  discard block
 block discarded – undo
217 217
                             $placest = implode(I18N::$list_separator, array_slice($levels, 0, $this->analysis_level));
218 218
                             if(isset($placesDispGeneral['places'][$placest])) {
219 219
                                 $placesDispGeneral['places'][$placest] += 1;
220
-                            }
221
-                            else { 
220
+                            } else { 
222 221
                                 $placesDispGeneral['places'][$placest] = 1;
223 222
                             }
224
-                            if($placesDispGeneral['places'][$placest]>$placesDispGeneral['max'])
225
-                                $placesDispGeneral['max'] = $placesDispGeneral['places'][$placest];
223
+                            if($placesDispGeneral['places'][$placest]>$placesDispGeneral['max']) {
224
+                                                            $placesDispGeneral['max'] = $placesDispGeneral['places'][$placest];
225
+                            }
226 226
                             foreach($genstab as $gen) {
227 227
                                 if(isset($placesDispGenerations[$gen]['places'][$placest])) {
228 228
                                     $placesDispGenerations[$gen]['places'][$placest] += 1;
229
-                                }
230
-                                else { 
229
+                                } else { 
231 230
                                     $placesDispGenerations[$gen]['places'][$placest] = 1;
232 231
                                 }
233 232
                                 if(isset($placesDispGenerations[$gen]['sum'])) {
234 233
                                     $placesDispGenerations[$gen]['sum'] += 1;
235
-                                }
236
-                                else { 
234
+                                } else { 
237 235
                                     $placesDispGenerations[$gen]['sum'] = 1;
238 236
                                 }
239 237
                             }
240
-                        }
241
-                        else{
238
+                        } else{
242 239
                             if(isset($placesDispGeneral['other'])) {
243 240
                                 $placesDispGeneral['other'] += 1;
244
-                            }
245
-                            else { 
241
+                            } else { 
246 242
                                 $placesDispGeneral['other'] = 1;
247 243
                             }
248 244
                             foreach($genstab as $gen) {
249 245
                                 if(isset($placesDispGenerations[$gen]['other'])) {
250 246
                                     $placesDispGenerations[$gen]['other'] += 1;
251
-                                }
252
-                                else { 
247
+                                } else { 
253 248
                                     $placesDispGenerations[$gen]['other'] = 1;
254 249
                                 }
255 250
                             }
@@ -263,8 +258,7 @@  discard block
 block discarded – undo
263 258
                     foreach($genstab as $gen) {
264 259
                         if(isset($placesDispGenerations[$gen]['unknown'])) { 
265 260
                             $placesDispGenerations[$gen]['unknown'] += 1;
266
-                        }
267
-                        else { 
261
+                        } else { 
268 262
                             $placesDispGenerations[$gen]['unknown'] = 1; 
269 263
                         }
270 264
                     }
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisEditView.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,10 @@
 block discarded – undo
54 54
     				<?php echo I18N::translate('Description'); ?>
55 55
     			</label>
56 56
     			<div class="col-sm-9">
57
-    				<input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if(!$is_new) echo 'value="' . Filter::escapeHtml($ga->getTitle()) .'"'; ?> dir="auto">
57
+    				<input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if(!$is_new) {
58
+	echo 'value="' . Filter::escapeHtml($ga->getTitle()) .'"';
59
+}
60
+?> dir="auto">
58 61
     				<p class="small text-muted">
59 62
     					<?php echo I18N::translate('Description to be given to the geographical dispersion analysis. It will be used as the page title for it.'); ?>
60 63
     				</p>
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGenerationsView.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
         if(!is_null($max_details_gen) && $max_details_gen == 0){
66 66
             $html .= I18N::translate('<strong><em>Place</em> or <em>Flag</em> aa (bb %%)</strong>: The first number indicates the total number of ancestors born in this place, the percentage relates this count to the total number of found places. No percentage means it is less than 10%%.').'<br />';
67 67
             $html .= I18N::translate('If any, the darker area indicates the number of unknown places within the generation or places outside the analysed area, and its percentage compared to the number of ancestors. No percentage means it is less than 10%%.');
68
-        }
69
-        else{
68
+        } else{
70 69
             $html .= I18N::translate('<strong><em>Place</em> [aa - bb %%]</strong>: The first number indicates the total number of ancestors born in this place, the percentage compares this count to the total number of found places.').'<br />';
71 70
             $html .= I18N::translate('Only the %d more frequent places for each generation are displayed.', $max_details_gen);
72 71
         }
@@ -97,16 +96,16 @@  discard block
 block discarded – undo
97 96
             $content = '';
98 97
             if(isset($dataplace['flag'])){
99 98
                 $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
100
-            }
101
-            else{
99
+            } else{
102 100
                 $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
103 101
             }
104 102
             $count = $dataplace['count'];
105 103
             $content .= I18N::number($count);
106 104
             $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
107 105
             $perc2= Functions::safeDivision($count, $sum_gen);
108
-            if($perc2>=0.1) 
109
-                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
106
+            if($perc2>=0.1) {
107
+                            $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
108
+            }
110 109
             $content .= '</td>';
111 110
                
112 111
             $html .= '
@@ -126,7 +125,9 @@  discard block
 block discarded – undo
126 125
         if($unknownother>0){
127 126
             $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
128 127
             $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
129
-            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
128
+            if($perc>=0.1) {
129
+            	$html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
130
+            }
130 131
             $html .='</td>';
131 132
         }
132 133
         
@@ -152,8 +153,7 @@  discard block
 block discarded – undo
152 153
             if($placename != 'other'){
153 154
                 $levels = array_map('trim',explode(',', $placename));
154 155
                 $placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
155
-            }
156
-            else{
156
+            } else{
157 157
                 $placename = I18N::translate('Other places');
158 158
             }
159 159
             $tmp_places[] = I18N::translate('<strong>%s</strong> [%d - %s]', $placename, $count, I18N::percentage(Functions::safeDivision($count, $sum_gen + $other), 1));         	
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGeneralMapView.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,9 @@
 block discarded – undo
86 86
             $html.= 'map.area'.$location['id'].' = paper.path("'.$location['coord'].'").attr(attr);';
87 87
             if(isset($location['transparency'])) {
88 88
                 $textToolTip = '<strong>'.$location['displayname'].'</strong><br/>';
89
-                if($this->data->get('use_flags') && $location['flag'] != '') $textToolTip .= '<span class="geodispersion_flag">'.FunctionsPrint::htmlPlaceIcon($location['place'], $location['flag']).'</span><br/>';
89
+                if($this->data->get('use_flags') && $location['flag'] != '') {
90
+                	$textToolTip .= '<span class="geodispersion_flag">'.FunctionsPrint::htmlPlaceIcon($location['place'], $location['flag']).'</span><br/>';
91
+                }
90 92
                 $textToolTip .= I18N::translate('%d individuals', $location['count']).'<br/>'.I18N::percentage(Functions::safeDivision($location['count'], $nb_found - $nb_other), 1);
91 93
                 $html.= 'addTip(map.area'.$location['id'].'.node, "'.Filter::escapeJs($textToolTip).'");';
92 94
                 $html.= 'map.area'.$location['id'].'.attr({"fill" : "'. $canvas->max_color .'", "fill-opacity" : '.$location['transparency'].' });';
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGeneralTableView.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,14 +37,15 @@
 block discarded – undo
37 37
             $perc = Functions::safeDivision($nb, $nb_found - $nb_other);
38 38
             if($nb!=$previous_nb){
39 39
                 $j= I18N::number($i);
40
-            }
41
-            else{
40
+            } else{
42 41
                 $j='&nbsp;';
43 42
             }
44 43
             	
45 44
             $levels = array_map('trim',explode(',', $place));
46 45
             $placename = $levels[$analysis_level-1];
47
-            if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]);
46
+            if($placename == '' && $analysis_level > 1) {
47
+            	$placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]);
48
+            }
48 49
             $html.=
49 50
             '<div class="maj-row">
50 51
                 <div class="label"><strong>'.$j.'</strong></div>
Please login to merge, or discard this patch.