Completed
Push — master ( 95506d...0f93c5 )
by Jonathan
07:55
created
src/Webtrees/Module/Sosa/Views/SosaListFamView.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
     protected function renderContent() { 
36 36
         
37
-        if($this->data->get('has_sosa', false)) {
37
+        if ($this->data->get('has_sosa', false)) {
38 38
             $table_id = $this->data->get('table_id');            
39 39
         ?>   
40 40
         
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 										class="ui-state-default"
53 53
 										title="<?php echo I18N::translate('Show individuals who are alive or couples where both partners are alive.'); ?>"
54 54
 									>
55
-									<?php echo I18N::translate('Both alive');?>
55
+									<?php echo I18N::translate('Both alive'); ?>
56 56
 									</button>
57 57
 									<button
58 58
 										type="button"
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 										class="ui-state-default"
62 62
 										title="<?php echo I18N::translate('Show couples where only the female partner is deceased.'); ?>"
63 63
 									>
64
-									<?php echo I18N::translate('Widower');?>
64
+									<?php echo I18N::translate('Widower'); ?>
65 65
 									</button>
66 66
 									<button
67 67
 										type="button"
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 				</thead>
187 187
 				<tbody>
188 188
 			
189
-			<?php foreach($this->data->get('sosa_list') as $sosa => $family) {
189
+			<?php foreach ($this->data->get('sosa_list') as $sosa => $family) {
190 190
 			    /** @var \Fisharebest\Webtrees\Family $person */
191 191
 
192 192
 			    //PERSO Create decorator for Family
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 			    }
204 204
 			    $dwife = new \MyArtJaub\Webtrees\Individual($wife);
205 205
 			    
206
-			    $mdate=$family->getMarriageDate();
206
+			    $mdate = $family->getMarriageDate();
207 207
 			    
208 208
 			    if ($family->isPendingAddtion()) {
209 209
 			        $class = ' class="new"';
@@ -219,18 +219,18 @@  discard block
 block discarded – undo
219 219
         			<!--  HUSBAND -->
220 220
         			<td colspan="2">
221 221
         			<?php foreach ($husb->getAllNames() as $num=>$name) {
222
-        				if ($name['type']=='NAME') {
223
-        					$title='';
222
+        				if ($name['type'] == 'NAME') {
223
+        					$title = '';
224 224
         				} else {
225
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"';
225
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"';
226 226
         				}
227
-        				if ($num==$husb->getPrimaryName()) {
228
-        					$class=' class="name2"';
229
-        					$sex_image=$husb->getSexImage();
230
-        					list($surn, $givn)=explode(',', $name['sort']);
227
+        				if ($num == $husb->getPrimaryName()) {
228
+        					$class = ' class="name2"';
229
+        					$sex_image = $husb->getSexImage();
230
+        					list($surn, $givn) = explode(',', $name['sort']);
231 231
         				} else {
232
-        					$class='';
233
-        					$sex_image='';
232
+        					$class = '';
233
+        					$sex_image = '';
234 234
         				} ?>
235 235
         				<a <?php echo $title.' '.$class; ?> href="<?php echo $husb->getHtmlUrl(); ?>">
236 236
         					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -244,29 +244,29 @@  discard block
 block discarded – undo
244 244
             		<!-- Dummy column to match colspan in header -->
245 245
             		<td style="display:none;"></td>
246 246
             		<td>
247
-            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
247
+            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
248 248
             		</td>
249 249
             		<td>
250
-            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
250
+            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
251 251
             		</td>
252
-            		<?php $hdate=$husb->getBirthDate(); ?>
252
+            		<?php $hdate = $husb->getBirthDate(); ?>
253 253
             		<td><?php  Date::getAge($hdate, $mdate, 2); ?></td>
254 254
             		<td><?php  Date::getAge($hdate, $mdate, 1); ?></td>
255 255
             		<!--  WIFE -->
256 256
         			<td colspan="2">
257 257
         			<?php foreach ($wife->getAllNames() as $num=>$name) {
258
-        				if ($name['type']=='NAME') {
259
-        					$title='';
258
+        				if ($name['type'] == 'NAME') {
259
+        					$title = '';
260 260
         				} else {
261
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"';
261
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"';
262 262
         				}
263
-        				if ($num==$wife->getPrimaryName()) {
264
-        					$class=' class="name2"';
265
-        					$sex_image=$wife->getSexImage();
266
-        					list($surn, $givn)=explode(',', $name['sort']);
263
+        				if ($num == $wife->getPrimaryName()) {
264
+        					$class = ' class="name2"';
265
+        					$sex_image = $wife->getSexImage();
266
+        					list($surn, $givn) = explode(',', $name['sort']);
267 267
         				} else {
268
-        					$class='';
269
-        					$sex_image='';
268
+        					$class = '';
269
+        					$sex_image = '';
270 270
         				} ?>
271 271
         				<a <?php echo $title.' '.$class; ?> href="<?php echo $wife->getHtmlUrl(); ?>">
272 272
         					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -280,12 +280,12 @@  discard block
 block discarded – undo
280 280
             		<!-- Dummy column to match colspan in header -->
281 281
             		<td style="display:none;"></td>
282 282
             		<td>
283
-            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
283
+            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
284 284
             		</td>
285 285
             		<td>
286
-            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
286
+            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
287 287
             		</td>
288
-            		<?php $wdate=$wife->getBirthDate(); ?>
288
+            		<?php $wdate = $wife->getBirthDate(); ?>
289 289
             		<td><?php  Date::getAge($wdate, $mdate, 2); ?></td>
290 290
             		<td><?php  Date::getAge($wdate, $mdate, 1); ?></td>
291 291
             		<td><?php 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             		    echo '&nbsp;';
303 303
             		} ?>
304 304
             		</td>
305
-            		<td><?php echo $marriage_dates ? $marriage_date->julianDay() : 0;  ?></td>
305
+            		<td><?php echo $marriage_dates ? $marriage_date->julianDay() : 0; ?></td>
306 306
             		<td><?php 
307 307
             		foreach ($family->getAllMarriagePlaces() as $n => $marriage_place) {
308 308
 				        $tmp = new Place($marriage_place, $family->getTree());
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 								<button type="button" class="ui-state-default btn-toggle-parents">
363 363
 									<?php echo I18N::translate('Show parents') ?>
364 364
 								</button>
365
-								<button id="btn-toggle-statistics-<?php echo $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics">
365
+								<button id="btn-toggle-statistics-<?php echo $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics">
366 366
 									<?php echo I18N::translate('Show statistics charts') ?>
367 367
 								</button>
368 368
 							</div>
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaComputeResultView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
 	 */
26 26
     protected function renderContent() {        
27 27
         
28
-        if($this->data->get('is_success', false)) {
28
+        if ($this->data->get('is_success', false)) {
29 29
         ?>        
30 30
         	<i class="icon-maj-success" title="<?php echo I18N::translate('Success'); ?>"></i>&nbsp;
31 31
         	<?php echo I18N::translate('Success'); ?>
32 32
         <?php } else { ?>
33 33
 			<i class="icon-maj-error" title="<?php echo I18N::translate('Error'); ?>"></i>&nbsp;
34 34
 			<?php echo I18N::translate('Error'); ?>
35
-			<?php if($error = $this->data->get('error')) { echo '&nbsp;-&nbsp;' . $error; }
35
+			<?php if ($error = $this->data->get('error')) { echo '&nbsp;-&nbsp;'.$error; }
36 36
         }
37 37
     }
38 38
     
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListMissingView.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
             <div id="maj-sosa-missing-page" class="center">
37 37
     			<h2><?php echo $this->data->get('title'); ?></h2>
38 38
     			
39
-    			<?php  if($this->data->get('is_setup')) { 
39
+    			<?php  if ($this->data->get('is_setup')) { 
40 40
     			    $selectedgen = $this->data->get('generation');
41 41
     			    $this->renderSosaHeader();
42
-    			    if($this->data->get('has_missing', false)) {
42
+    			    if ($this->data->get('has_missing', false)) {
43 43
     			        $missing_list = $this->data->get('missing_list');
44 44
     			        $table_id = $this->data->get('table_id');
45 45
     			        ?>
46 46
     			<div id="sosa-indi-missing" class="smissing-list">
47
-                	<table id="<?php echo $table_id;?>">
47
+                	<table id="<?php echo $table_id; ?>">
48 48
         				<thead>     
49 49
             				<tr>
50 50
     							<th colspan="16">
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         				</thead>
113 113
         			<tbody>
114 114
         			
115
-        			<?php foreach($this->data->get('missing_list') as $missing_tab) {
115
+        			<?php foreach ($this->data->get('missing_list') as $missing_tab) {
116 116
         			    $person = $missing_tab['indi'];
117 117
         			    
118 118
         			    /** @var \Fisharebest\Webtrees\Individual $person */
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
                 			<td class="transparent"><?php echo $person->getXref(); ?></td>
131 131
                 			<td colspan="2">
132 132
                 			<?php foreach ($person->getAllNames() as $num=>$name) {
133
-                				if ($name['type']=='NAME') {
134
-                					$title='';
133
+                				if ($name['type'] == 'NAME') {
134
+                					$title = '';
135 135
                 				} else {
136
-                					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
136
+                					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
137 137
                 				}
138
-                				if ($num==$person->getPrimaryName()) {
139
-                					$class=' class="name2"';
140
-                					$sex_image=$person->getSexImage();
141
-                					list($surn, $givn)=explode(',', $name['sort']);
138
+                				if ($num == $person->getPrimaryName()) {
139
+                					$class = ' class="name2"';
140
+                					$sex_image = $person->getSexImage();
141
+                					list($surn, $givn) = explode(',', $name['sort']);
142 142
                 				} else {
143
-                					$class='';
144
-                					$sex_image='';
143
+                					$class = '';
144
+                					$sex_image = '';
145 145
                 				} ?>
146 146
                 				<a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>">
147 147
                 					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
                     		</td>
155 155
                     		<td style="display:none;"></td>
156 156
                     		<td>
157
-                    			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
157
+                    			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
158 158
                     		</td>
159 159
                     		<td>
160
-                    			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
160
+                    			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
161 161
                     		</td>                    		
162 162
                 			<?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) {
163 163
         				        $isISourced = $dperson->isSourced(); ?>
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
         					<td>&nbsp;</td>
168 168
         					<td></td>
169 169
         					<?php } ?>
170
-        					<td><?php echo $missing_tab['has_father'] ? '&nbsp;' : 'X';?></td>
171
-        					<td><?php echo $missing_tab['has_mother'] ? '&nbsp;' : 'X';?></td>
170
+        					<td><?php echo $missing_tab['has_father'] ? '&nbsp;' : 'X'; ?></td>
171
+        					<td><?php echo $missing_tab['has_mother'] ? '&nbsp;' : 'X'; ?></td>
172 172
         					<td>
173 173
                     		<?php 
174
-                    		if ($birth_dates=$person->getAllBirthDates()) {
174
+                    		if ($birth_dates = $person->getAllBirthDates()) {
175 175
         			            foreach ($birth_dates as $num=>$birth_date) {
176 176
             					   if ($num) { ?><br/><?php } ?>
177 177
             						<?php  echo $birth_date->display(true);
178 178
         			            }
179 179
                     		} else {
180
-                    		    $birth_date=$person->getEstimatedBirthDate();
180
+                    		    $birth_date = $person->getEstimatedBirthDate();
181 181
                     		    if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) {
182 182
                     		        $birth_date->display(true);
183 183
                     		    } else {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                     		}
188 188
                     		?>
189 189
                     		</td>
190
-                    		<td><?php echo $birth_date->julianDay();?></td>
190
+                    		<td><?php echo $birth_date->julianDay(); ?></td>
191 191
                 			<td>
192 192
                 			<?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) {
193 193
         				        $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree());
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 									$missing_hidden = $this->data->get('missing_hidden');
219 219
 									?>
220 220
 									<?php echo I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))); ?>
221
-									<?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?>
222
-									<?php echo ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?>
223
-									<?php echo ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']'; ?>
221
+									<?php if ($this->data->get('missing_hidden') > 0) echo ' ['.I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?>
222
+									<?php echo ' - '.I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?>
223
+									<?php echo ' ['.I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'), 2)).']'; ?>
224 224
 								</div>
225 225
 							</td>
226 226
 						</tr>
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/SosaStatsController.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $view_bag->set('title', $controller->getPageTitle());
65 65
         $view_bag->set('is_setup', false);
66 66
         
67
-        if($this->sosa_provider->isSetup()) {
67
+        if ($this->sosa_provider->isSetup()) {
68 68
             $view_bag->set('is_setup', true);
69 69
             
70 70
             $sosaCount = $this->sosa_provider->getSosaCount();
@@ -82,23 +82,23 @@  discard block
 block discarded – undo
82 82
             $stats_gen = $this->sosa_provider->getStatisticsByGeneration();
83 83
             $view_bag->set('missinganc_url', 'module.php?mod='.$this->module->getName().'&mod_action=SosaList@missing&ged='.$WT_TREE->getNameUrl().'&gen=');
84 84
             
85
-            $gen_theoretical=1;
86
-            $total_theoretical=0;
87
-            $prev_diff=0;
88
-            $prev_known=0.5;
89
-            $gen_equiv=0;            
85
+            $gen_theoretical = 1;
86
+            $total_theoretical = 0;
87
+            $prev_diff = 0;
88
+            $prev_known = 0.5;
89
+            $gen_equiv = 0;            
90 90
             $generation_stats = array();
91 91
             
92
-            foreach($stats_gen as $gen => $tab){
93
-                $genY1= I18N::translate('-');
94
-                $genY2= I18N::translate('-');
95
-                if($tab['firstBirth']>0) $genY1=$tab['firstBirth'];
96
-                if($tab['lastBirth']>0) $genY2=$tab['lastBirth'];
92
+            foreach ($stats_gen as $gen => $tab) {
93
+                $genY1 = I18N::translate('-');
94
+                $genY2 = I18N::translate('-');
95
+                if ($tab['firstBirth'] > 0) $genY1 = $tab['firstBirth'];
96
+                if ($tab['lastBirth'] > 0) $genY2 = $tab['lastBirth'];
97 97
                 $total_theoretical += $gen_theoretical;
98 98
                 $perc_sosa_count_theor = Functions::safeDivision($tab['sosaCount'], $gen_theoretical);
99 99
                 $gen_equiv += $perc_sosa_count_theor;
100
-                $missing=2*$prev_known - $tab['sosaCount'];
101
-                $gen_diff=$tab['diffSosaTotalCount']-$prev_diff;
100
+                $missing = 2 * $prev_known - $tab['sosaCount'];
101
+                $gen_diff = $tab['diffSosaTotalCount'] - $prev_diff;
102 102
                 
103 103
                 $generation_stats[$gen] = array(
104 104
                     'gen_min_birth' => $genY1,
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                     'known' => $tab['sosaCount'],
108 108
                     'perc_known' => $perc_sosa_count_theor,
109 109
                     'missing' => $missing,
110
-                    'perc_missing' => 1-Functions::safeDivision($tab['sosaCount'], 2*$prev_known),
110
+                    'perc_missing' => 1 - Functions::safeDivision($tab['sosaCount'], 2 * $prev_known),
111 111
                     'total_known' => $tab['sosaTotalCount'],
112 112
                     'perc_total_known' => Functions::safeDivision($tab['sosaTotalCount'], $total_theoretical),
113 113
                     'different' => $gen_diff,
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
                 );
118 118
                 
119 119
                 $gen_theoretical = $gen_theoretical * 2;
120
-                $prev_known=$tab['sosaCount'];
121
-                $prev_diff=$tab['diffSosaTotalCount'];
120
+                $prev_known = $tab['sosaCount'];
121
+                $prev_diff = $tab['diffSosaTotalCount'];
122 122
             }
123 123
             
124 124
             $view_bag->set('generation_stats', $generation_stats);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      private function htmlAncestorDispersionG2()
140 140
     {
141 141
         $ancestorsDispGen2 = $this->sosa_provider->getAncestorDispersionForGen(2);
142
-        if(count($ancestorsDispGen2) == 0) return;
142
+        if (count($ancestorsDispGen2) == 0) return;
143 143
         
144 144
         $size = '600x300';
145 145
         $sizes = explode('x', $size);
@@ -150,21 +150,21 @@  discard block
 block discarded – undo
150 150
         
151 151
         $total = array_sum($ancestorsDispGen2);
152 152
         $father_count = isset($ancestorsDispGen2[1]) ? $ancestorsDispGen2[1] : 0;
153
-        $father = array (
153
+        $father = array(
154 154
             'color' => '84beff', 
155 155
             'count' => $father_count, 
156 156
             'perc' => Functions::safeDivision($father_count, $total), 
157 157
             'name' => \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fat')            
158 158
         );
159 159
         $mother_count = isset($ancestorsDispGen2[2]) ? $ancestorsDispGen2[2] : 0;
160
-        $mother = array (
160
+        $mother = array(
161 161
             'color' => 'ffd1dc', 
162 162
             'count' => $mother_count, 
163 163
             'perc' => Functions::safeDivision($mother_count, $total),
164 164
             'name' => \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('mot')
165 165
         );
166 166
         $shared_count = isset($ancestorsDispGen2[-1]) ? $ancestorsDispGen2[-1] : 0;
167
-        $shared = array (
167
+        $shared = array(
168 168
             'color' => '777777', 
169 169
             'count' => $shared_count, 
170 170
             'perc' => Functions::safeDivision($shared_count, $total),
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
         $chd = $this->arrayToExtendedEncoding(array(4095 * $father['perc'], 4095 * $shared['perc'], 4095 * $mother['perc']));
175 175
         $chart_title = I18N::translate('Known Sosa ancestors\' dispersion');
176 176
         $chl = 
177
-             $father['name'] . ' - ' . I18N::percentage($father['perc'], 1) . '|' .
178
-             $shared['name'] . ' - ' . I18N::percentage($shared['perc'], 1) . '|' .
179
-             $mother['name'] . ' - ' . I18N::percentage($mother['perc'], 1);
180
-        return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$father['color']},{$shared['color']},{$mother['color']}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
177
+             $father['name'].' - '.I18N::percentage($father['perc'], 1).'|'.
178
+             $shared['name'].' - '.I18N::percentage($shared['perc'], 1).'|'.
179
+             $mother['name'].' - '.I18N::percentage($mother['perc'], 1);
180
+        return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$father['color']},{$shared['color']},{$mother['color']}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" alt=\"".$chart_title."\" title=\"".$chart_title."\" />";
181 181
     }
182 182
     
183 183
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $total_motfat = $ancestorsDispGen2[4] ?: 0;
202 202
         $total_motmot = $ancestorsDispGen2[8] ?: 0;
203 203
         $total_sha = $ancestorsDispGen2[-1] ?: 0;
204
-        $total = $total_fatfat + $total_fatmot + $total_motfat+ $total_motmot + $total_sha;
204
+        $total = $total_fatfat + $total_fatmot + $total_motfat + $total_motmot + $total_sha;
205 205
     
206 206
         $chd = $this->arrayToExtendedEncoding(array(
207 207
             4095 * $total_fatfat / $total, 
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
         ));
213 213
         $chart_title = I18N::translate('Known Sosa ancestors\' dispersion - G3');
214 214
         $chl =
215
-            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatfat') . ' - ' . I18N::percentage(Functions::safeDivision($total_fatfat, $total), 1) . '|' .
216
-            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatmot') . ' - ' . I18N::percentage(Functions::safeDivision($total_fatmot, $total), 1) . '|' .
217
-            I18N::translate('Shared') . ' - ' . I18N::percentage(Functions::safeDivision($total_sha, $total), 1) . '|' .
218
-            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motfat') . ' - ' . I18N::percentage(Functions::safeDivision($total_motfat, $total), 1) . '|' .
219
-            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motmot') . ' - ' . I18N::percentage(Functions::safeDivision($total_motmot, $total), 1);
220
-         return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_fatfat},{$color_fatmot},{$color_shared},{$color_motfat},{$color_motmot}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />";
215
+            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatfat').' - '.I18N::percentage(Functions::safeDivision($total_fatfat, $total), 1).'|'.
216
+            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatmot').' - '.I18N::percentage(Functions::safeDivision($total_fatmot, $total), 1).'|'.
217
+            I18N::translate('Shared').' - '.I18N::percentage(Functions::safeDivision($total_sha, $total), 1).'|'.
218
+            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motfat').' - '.I18N::percentage(Functions::safeDivision($total_motfat, $total), 1).'|'.
219
+            \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motmot').' - '.I18N::percentage(Functions::safeDivision($total_motmot, $total), 1);
220
+         return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_fatfat},{$color_fatmot},{$color_shared},{$color_motfat},{$color_motmot}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" alt=\"".$chart_title."\" title=\"".$chart_title."\" />";
221 221
     }
222 222
 
223 223
     /**
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
             if ($value < 0) {
234 234
                 $value = 0;
235 235
             }
236
-            $first  = (int) ($value / 64);
236
+            $first  = (int)($value / 64);
237 237
             $second = $value % 64;
238
-            $encoding .= $xencoding[(int) $first] . $xencoding[(int) $second];
238
+            $encoding .= $xencoding[(int)$first].$xencoding[(int)$second];
239 239
         }
240 240
     
241 241
         return $encoding;
Please login to merge, or discard this patch.
src/Webtrees/Module/PatronymicLineage/Model/LineageNode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @param Fisharebest\Webtrees\Family $fams
58 58
 	 */
59 59
 	public function addFamily(Family $fams) {
60
-		if($fams && !isset($this->linked_fams[$fams])) {
60
+		if ($fams && !isset($this->linked_fams[$fams])) {
61 61
 			$this->linked_fams[$fams] = array();
62 62
 		}
63 63
 	}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param LineageNode $child
70 70
 	 */
71 71
 	public function addChild(Family $fams, LineageNode $child = null) {
72
-		if($fams) {
72
+		if ($fams) {
73 73
 			$this->addFamily($fams);
74 74
 			$tmp = $this->linked_fams[$fams];
75 75
 			$tmp[] = $child;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @return boolean
120 120
 	 */
121 121
 	public function hasFollowUpSurname() {
122
-		return !is_null($this->alt_surname) && strlen($this->alt_surname) > 0 ;
122
+		return !is_null($this->alt_surname) && strlen($this->alt_surname) > 0;
123 123
 	}
124 124
 	
125 125
 }
Please login to merge, or discard this patch.
src/Webtrees/Module/PatronymicLineage/Model/LineageRootNode.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
 	 * @param Place $place
38 38
 	 */
39 39
 	public function addPlace(Place $place) {
40
-		if(!is_null($place) && !$place->isEmpty()){
40
+		if (!is_null($place) && !$place->isEmpty()) {
41 41
 			$place_name = $place->getFullName();
42
-			if(isset($this->places[$place_name])){
43
-				$this->places[$place_name]+=1;
42
+			if (isset($this->places[$place_name])) {
43
+				$this->places[$place_name] += 1;
44 44
 			}
45
-			else{
45
+			else {
46 46
 				$this->places[$place_name] = 1;
47 47
 			}
48 48
 		}
Please login to merge, or discard this patch.
src/Webtrees/Module/PatronymicLineage/LineageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
             $this->show     = 'lineage'; // SURN list makes no sense here
93 93
         } elseif ($this->alpha) {
94 94
             $this->show_all = 'no';
95
-            $this->legend   = Filter::escapeHtml($this->alpha) . '…';
95
+            $this->legend   = Filter::escapeHtml($this->alpha).'…';
96 96
             $this->show     = Filter::get('show', 'surn|lineage', 'surn');
97 97
         } else {
98 98
             $this->show_all = 'no';
99 99
             $this->legend   = '…';
100 100
             $this->show     = 'none'; // Don't show lists until something is chosen
101 101
         }
102
-        $this->legend = '<span dir="auto">' . $this->legend . '</span>';
102
+        $this->legend = '<span dir="auto">'.$this->legend.'</span>';
103 103
           
104 104
     }
105 105
     
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         global $WT_TREE;
153 153
         
154 154
         $controller = new PageController();
155
-        $controller->setPageTitle(I18N::translate('Patronymic Lineages') . ' : ' . $this->legend);
155
+        $controller->setPageTitle(I18N::translate('Patronymic Lineages').' : '.$this->legend);
156 156
         
157 157
         $view_bag = new ViewBag();
158 158
         $view_bag->set('title', $controller->getPageTitle());
@@ -161,15 +161,15 @@  discard block
 block discarded – undo
161 161
         $view_bag->set('surname', $this->surname);
162 162
         $view_bag->set('legend', $this->legend);
163 163
         $view_bag->set('show_all', $this->show_all);
164
-        if($this->isShowingSurnames()) {
164
+        if ($this->isShowingSurnames()) {
165 165
             $view_bag->set('issurnames', true);
166 166
             $view_bag->set('surnameslist', $this->getSurnamesList());
167 167
         }
168
-        if($this->isShowingLineages()) {
168
+        if ($this->isShowingLineages()) {
169 169
             $view_bag->set('islineages', true);
170 170
             $view_bag->set('lineages', $this->getLineages());
171 171
 
172
-            if ($this->show_all==='no') {
172
+            if ($this->show_all === 'no') {
173 173
             	$view_bag->set('table_title', I18N::translate('Individuals in %s lineages', $this->legend));
174 174
             }
175 175
             else {
Please login to merge, or discard this patch.
src/Webtrees/Module/SosaModule.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function getConfigLink() {
78 78
         Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
79 79
         
80
-        return 'module.php?mod=' . $this->getName() . '&amp;mod_action=SosaConfig';
80
+        return 'module.php?mod='.$this->getName().'&amp;mod_action=SosaConfig';
81 81
     }
82 82
     
83 83
     /**********
@@ -100,17 +100,17 @@  discard block
 block discarded – undo
100 100
         global $WT_TREE, $controller;
101 101
         
102 102
         $menu = null;
103
-        if(ModuleManager::getInstance()->isOperational($this->getName())) {
103
+        if (ModuleManager::getInstance()->isOperational($this->getName())) {
104 104
             
105
-            $root_url = 'module.php?mod=' . $this->getName() . '&ged=' . $WT_TREE->getNameUrl() . '&';
106
-            $sosa_stat_menu = new Menu(I18N::translate('Sosa Statistics'), $root_url . 'mod_action=SosaStats', 'menu-maj-sosa-stats');
105
+            $root_url = 'module.php?mod='.$this->getName().'&ged='.$WT_TREE->getNameUrl().'&';
106
+            $sosa_stat_menu = new Menu(I18N::translate('Sosa Statistics'), $root_url.'mod_action=SosaStats', 'menu-maj-sosa-stats');
107 107
             
108 108
             $menu = clone $sosa_stat_menu;
109 109
             $menu->setClass('menu-maj-sosa');
110 110
             
111 111
             $submenus = array_filter(array(
112
-                new Menu(I18N::translate('Sosa Ancestors'), $root_url . 'mod_action=SosaList', 'menu-maj-sosa-list', array('rel' => 'nofollow')),
113
-                new Menu(I18N::translate('Missing Ancestors'), $root_url . 'mod_action=SosaList@missing', 'menu-maj-sosa-missing', array('rel' => 'nofollow')),
112
+                new Menu(I18N::translate('Sosa Ancestors'), $root_url.'mod_action=SosaList', 'menu-maj-sosa-list', array('rel' => 'nofollow')),
113
+                new Menu(I18N::translate('Missing Ancestors'), $root_url.'mod_action=SosaList@missing', 'menu-maj-sosa-missing', array('rel' => 'nofollow')),
114 114
                 $sosa_stat_menu                
115 115
             ));
116 116
             
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
                 && $ga_list = Module::getModuleByName(Constants::MODULE_MAJ_GEODISP_NAME)->getProvider()->getGeoAnalysisList()
120 120
                 )
121 121
             {
122
-                if(count($ga_list) > 0) {
123
-                    $submenus[] = new Menu(I18N::translate('Geographical Dispersion'), 'module.php?mod=' . Constants::MODULE_MAJ_GEODISP_NAME . '&ged=' . $WT_TREE->getNameUrl() . '&mod_action=GeoAnalysis@listAll', 'menu-maj-sosa-geodispersion');
122
+                if (count($ga_list) > 0) {
123
+                    $submenus[] = new Menu(I18N::translate('Geographical Dispersion'), 'module.php?mod='.Constants::MODULE_MAJ_GEODISP_NAME.'&ged='.$WT_TREE->getNameUrl().'&mod_action=GeoAnalysis@listAll', 'menu-maj-sosa-geodispersion');
124 124
                 }
125 125
             }
126 126
             
127
-            if(Auth::check()) {
127
+            if (Auth::check()) {
128 128
                 $submenus[] = new Menu(
129 129
                     I18N::translate('Sosa Configuration'),
130 130
                     $this->getConfigLink(),
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     ->addInlineJavascript('
141 141
                         function majComputeSosaFromIndi(){
142 142
                             if($("#computesosadlg").length == 0) {
143
-                                $("body").append("<div id=\"computesosadlg\" title=\"'. I18N::translate('Sosas computation') .'\"><div id=\"sosaloadingarea\"></div></div>");
143
+                                $("body").append("<div id=\"computesosadlg\" title=\"'. I18N::translate('Sosas computation').'\"><div id=\"sosaloadingarea\"></div></div>");
144 144
                             }
145 145
 	                        $("#computesosadlg").dialog({
146 146
                                 modal: true,
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 		                        open: function(event, ui) {
150 150
 			                        $("button.ui-dialog-titlebar-close").hide();
151 151
                                     $("#sosaloadingarea").empty().html("<i class=\"icon-loading-small\"></i>");
152
-			                        $("#sosaloadingarea").load("module.php?mod=' . $this->getName() . '&mod_action=SosaConfig@computePartial&ged='. $WT_TREE->getNameUrl() .'&userid='.Auth::user()->getUserId().'&pid=' . $controller->getSignificantIndividual()->getXref() . '", 
152
+			                        $("#sosaloadingarea").load("module.php?mod=' . $this->getName().'&mod_action=SosaConfig@computePartial&ged='.$WT_TREE->getNameUrl().'&userid='.Auth::user()->getUserId().'&pid='.$controller->getSignificantIndividual()->getXref().'", 
153 153
 					                   function(){
154 154
 						                  $("button.ui-dialog-titlebar-close").show();
155 155
                                           setTimeout(function(){
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtender::hExtendIndiHeaderIcons()
200 200
      */
201 201
     public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) {
202
-        if($ctrlIndi){
202
+        if ($ctrlIndi) {
203 203
             $dindi = new Individual($ctrlIndi->getSignificantIndividual());
204 204
             return FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 1, 'large');
205 205
         }
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
      * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtender::hExtendIndiHeaderRight()
218 218
      */
219 219
     public function hExtendIndiHeaderRight(IndividualController $ctrlIndi) {
220
-        if($ctrlIndi){
220
+        if ($ctrlIndi) {
221 221
             $dindi = new Individual($ctrlIndi->getSignificantIndividual());
222
-            return array('indi-header-sosa',  FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 2, 'normal'));
222
+            return array('indi-header-sosa', FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 2, 'normal'));
223 223
         }
224 224
         return '';
225 225
     }
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\RecordNameTextExtender::hRecordNameAppend()
230 230
      */
231 231
     public function hRecordNameAppend(GedcomRecord $grec) {
232
-        if($grec instanceof \Fisharebest\Webtrees\Individual){ // Only apply to individuals
232
+        if ($grec instanceof \Fisharebest\Webtrees\Individual) { // Only apply to individuals
233 233
             $dindi = new Individual($grec);
234 234
             return FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 1, 'small');
235 235
         }
Please login to merge, or discard this patch.
src/Webtrees/Module/Hooks/Views/AdminConfigView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
 							?>
61 61
 							<tr>
62 62
 								<td>
63
-									<input type="hidden" name="hook-<?php echo $hook->id;?>" value="yes" >
64
-									<?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status)=='enabled'); ?>
63
+									<input type="hidden" name="hook-<?php echo $hook->id; ?>" value="yes" >
64
+									<?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status) == 'enabled'); ?>
65 65
 								</td>
66
-								<td><?php echo (($hook->status)=='enabled'); ?></td>
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)) echo $mod->getTitle(); ?></td>
70 70
 								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
71 71
 								<td><?php echo $hook->priority; ?></td>
72 72
 							</tr>
Please login to merge, or discard this patch.