Completed
Push — master ( 113d57...b40ea8 )
by Jonathan
02:59
created
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisEditView.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 	 * {@inhericDoc}
26 26
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
27 27
 	 */
28
-    protected function renderContent() {
28
+	protected function renderContent() {
29 29
         
30
-        /** @var GeoAnalysis $ga */
31
-        $ga = $this->data->get('geo_analysis');
32
-        $is_new = is_null($ga);
30
+		/** @var GeoAnalysis $ga */
31
+		$ga = $this->data->get('geo_analysis');
32
+		$is_new = is_null($ga);
33 33
         
34
-        $places_hierarchy = $this->data->get('places_hierarchy');
35
-        ?>        
34
+		$places_hierarchy = $this->data->get('places_hierarchy');
35
+		?>        
36 36
         <ol class="breadcrumb small">
37 37
         	<li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li>
38 38
 			<li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li>
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     	</form>
156 156
 		
157 157
 		<?php        
158
-    }
158
+	}
159 159
     
160 160
 }
161 161
  
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		
45 45
 		<form class="form-horizontal" name="newform" method="post" role="form" action="<?php echo $this->data->get('save_url'); ?>" autocomplete="off">
46 46
     		<?php echo Filter::getCsrf(); ?>
47
-    		<?php if(!$is_new) { ?>
47
+    		<?php if (!$is_new) { ?>
48 48
     		<input type="hidden" name="ga_id" value="<?php echo $ga->getId(); ?>">
49 49
     		<?php } ?>
50 50
     
@@ -54,7 +54,7 @@  discard block
 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) echo 'value="'.Filter::escapeHtml($ga->getTitle()).'"'; ?> dir="auto">
58 58
     				<p class="small text-muted">
59 59
     					<?php echo I18N::translate('Description to be given to the geographical dispersion analysis. It will be used as the page title for it.'); ?>
60 60
     				</p>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         				<?php echo I18N::translate('Map'); ?>
98 98
         			</label>
99 99
         			<div class="col-sm-9">
100
-        				<?php echo FunctionsEdit::selectEditControl('map_file', $this->data->get('map_list') , null, $is_new || ! $ga->hasMap() ? '' : base64_encode($ga->getOptions()->getMap()->getFileName()), 'class="form-control"'); ?>
100
+        				<?php echo FunctionsEdit::selectEditControl('map_file', $this->data->get('map_list'), null, $is_new || !$ga->hasMap() ? '' : base64_encode($ga->getOptions()->getMap()->getFileName()), 'class="form-control"'); ?>
101 101
         				<p class="small text-muted">
102 102
         					<?php echo I18N::translate('Map outline to be used for the result display.'); ?>
103 103
         				</p>
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         				<?php echo I18N::translate('Map parent level'); ?>
111 111
         			</label>
112 112
         			<div class="col-sm-9">
113
-        				<?php echo FunctionsEdit::selectEditControl('map_top_level', $places_hierarchy['hierarchy'], null, $is_new || ! $ga->hasMap() ? '' : $ga->getOptions()->getMapLevel() - 1, 'class="form-control"'); ?>
113
+        				<?php echo FunctionsEdit::selectEditControl('map_top_level', $places_hierarchy['hierarchy'], null, $is_new || !$ga->hasMap() ? '' : $ga->getOptions()->getMapLevel() - 1, 'class="form-control"'); ?>
114 114
         				<p class="small text-muted">
115 115
         					<?php echo I18N::translate('Subdivision level of the parent subdivision(s) represented by the map.'); ?><br />
116 116
         					<?php echo I18N::translate('For instance, if the map is intended to represent a country by county analysis, then the map parent level would be “Country”, and the analysis level would be “County”.'); ?>
Please login to merge, or discard this 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/GeoAnalysisView.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 	 * {@inhericDoc}
25 25
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
26 26
 	 */
27
-    protected function renderContent() {        
28
-        ?>                
27
+	protected function renderContent() {        
28
+		?>                
29 29
         <div id="maj-geodisp-list-page" class="center">
30 30
 			<h2><?php echo $this->data->get('title'); ?></h2>
31 31
 			
32 32
 			<?php
33 33
 			if($this->data->get('has_analysis', false)) { 
34
-			    /** @var GeoAnalysis $ga  */
35
-    		    $ga = $this->data->get('geoanalysis');
36
-    		?>
34
+				/** @var GeoAnalysis $ga  */
35
+				$ga = $this->data->get('geoanalysis');
36
+			?>
37 37
     		
38 38
     		<div id="geodispersion-panel">
39 39
     			<h3><?php echo $ga->getTitle() ?></h3>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     	</div>
67 67
     	
68 68
     	<?php 
69
-    }
69
+	}
70 70
     
71 71
 }
72 72
  
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 			<h2><?php echo $this->data->get('title'); ?></h2>
31 31
 			
32 32
 			<?php
33
-			if($this->data->get('has_analysis', false)) { 
33
+			if ($this->data->get('has_analysis', false)) { 
34 34
 			    /** @var GeoAnalysis $ga  */
35 35
     		    $ga = $this->data->get('geoanalysis');
36 36
     		?>
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGenerationsView.php 3 patches
Spacing   +30 added lines, -31 removed lines patch added patch discarded remove patch
@@ -38,39 +38,38 @@  discard block
 block discarded – undo
38 38
         '<div id="geodispersion_gen">
39 39
         	<table id="geodispersion_gentable" class="center">';
40 40
             
41
-        foreach($results_by_gen as $gen => $genData){
41
+        foreach ($results_by_gen as $gen => $genData) {
42 42
             $html .= 
43 43
             '<tr>
44 44
                 <td class="descriptionbox">' .
45 45
                     I18N::translate("Generation %s", I18N::number($gen)).
46 46
                     ($display_all_places ? '<br />' : ' ').
47
-                    I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']),1)) . 
47
+                    I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']), 1)). 
48 48
                 '</td>
49 49
                  <td class="optionbox left">'.
50 50
                     ($display_all_places ? 
51
-                        $this->htmlGenerationAllPlacesRow($genData, $analysis_level) :
52
-                        $this->htmlGenerationTopPlacesRow($genData, $analysis_level)
53
-                     ) .
51
+                        $this->htmlGenerationAllPlacesRow($genData, $analysis_level) : $this->htmlGenerationTopPlacesRow($genData, $analysis_level)
52
+                     ).
54 53
                 '</ditdv>
55 54
             </tr>';
56 55
         }       
57 56
         
58
-        $html.= 
57
+        $html .= 
59 58
             '</table>
60 59
             <div class="left">
61
-                <strong>' . I18N::translate('Interpretation help:') . '</strong>
60
+                <strong>' . I18N::translate('Interpretation help:').'</strong>
62 61
                 <br />'.
63
-                I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.') . 
62
+                I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.'). 
64 63
                 '<br />';
65
-        if(!is_null($max_details_gen) && $max_details_gen == 0){
64
+        if (!is_null($max_details_gen) && $max_details_gen == 0) {
66 65
             $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 66
             $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 67
         }
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
         }
73
-        $html.= 
72
+        $html .= 
74 73
             '</div>
75 74
         </div>';
76 75
         
@@ -92,25 +91,25 @@  discard block
 block discarded – undo
92 91
         
93 92
         $sum_gen = $data['sum'];
94 93
         $unknownother = $data['unknown'] + $data['other'];
95
-        foreach($data['places'] as $placename=> $dataplace){
96
-            $levels = array_map('trim',explode(',', $placename));
94
+        foreach ($data['places'] as $placename=> $dataplace) {
95
+            $levels = array_map('trim', explode(',', $placename));
97 96
             $content = '';
98
-            if(isset($dataplace['flag'])){
99
-                $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
97
+            if (isset($dataplace['flag'])) {
98
+                $content .= '<td class="geodispersion_flag">'.FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']).'</td><td>';
100 99
             }
101
-            else{
102
-                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
100
+            else {
101
+                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level - 1].'</span><br/>';
103 102
             }
104 103
             $count = $dataplace['count'];
105 104
             $content .= I18N::number($count);
106 105
             $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
107
-            $perc2= Functions::safeDivision($count, $sum_gen);
108
-            if($perc2>=0.1) 
109
-                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
106
+            $perc2 = Functions::safeDivision($count, $sum_gen);
107
+            if ($perc2 >= 0.1) 
108
+                $content .= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
110 109
             $content .= '</td>';
111 110
                
112 111
             $html .= '
113
-                <td class="geodispersion_rowitem" width="'.max(round(100*$perc, 0),1).'%">
112
+                <td class="geodispersion_rowitem" width="'.max(round(100 * $perc, 0), 1).'%">
114 113
                     <table>
115 114
                         <tr>
116 115
                             <td>
@@ -123,11 +122,11 @@  discard block
 block discarded – undo
123 122
                 </td>';
124 123
         }
125 124
         
126
-        if($unknownother>0){
127
-            $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
128
-            $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
129
-            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
130
-            $html .='</td>';
125
+        if ($unknownother > 0) {
126
+            $perc = Functions::safeDivision($unknownother, $sum_gen + $unknownother);
127
+            $html .= '<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
128
+            if ($perc >= 0.1) $html .= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
129
+            $html .= '</td>';
131 130
         }
132 131
         
133 132
         $html .= 
@@ -148,12 +147,12 @@  discard block
 block discarded – undo
148 147
         $sum_gen = $data['sum'];
149 148
         $other = $data['other'];
150 149
         
151
-        foreach($data['places'] as $placename => $count) {
152
-            if($placename != 'other'){
153
-                $levels = array_map('trim',explode(',', $placename));
154
-                $placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
150
+        foreach ($data['places'] as $placename => $count) {
151
+            if ($placename != 'other') {
152
+                $levels = array_map('trim', explode(',', $placename));
153
+                $placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level - 1].'</span>';
155 154
             }
156
-            else{
155
+            else {
157 156
                 $placename = I18N::translate('Other places');
158 157
             }
159 158
             $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.
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.
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -24,89 +24,89 @@  discard block
 block discarded – undo
24 24
 	 * {@inhericDoc}
25 25
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
26 26
 	 */
27
-    protected function renderContent() {       
27
+	protected function renderContent() {       
28 28
 
29
-        $max_details_gen = $this->data->get('max_details_gen');
30
-        $analysis_level = $this->data->get('analysis_level');
31
-        $results_by_gen = $this->data->get('results_by_generations');
32
-        $display_all_places = $this->data->get('display_all_places', true);
29
+		$max_details_gen = $this->data->get('max_details_gen');
30
+		$analysis_level = $this->data->get('analysis_level');
31
+		$results_by_gen = $this->data->get('results_by_generations');
32
+		$display_all_places = $this->data->get('display_all_places', true);
33 33
         
34
-        $html = 
35
-        '<div id="geodispersion_gen">
34
+		$html = 
35
+		'<div id="geodispersion_gen">
36 36
         	<table id="geodispersion_gentable" class="center">';
37 37
             
38
-        foreach($results_by_gen as $gen => $genData){
39
-            $html .= 
40
-            '<tr>
38
+		foreach($results_by_gen as $gen => $genData){
39
+			$html .= 
40
+			'<tr>
41 41
                 <td class="descriptionbox">' .
42
-                    I18N::translate("Generation %s", I18N::number($gen)).
43
-                    ($display_all_places ? '<br />' : ' ').
44
-                    I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']),1)) . 
45
-                '</td>
42
+					I18N::translate("Generation %s", I18N::number($gen)).
43
+					($display_all_places ? '<br />' : ' ').
44
+					I18N::translate('(%s)', I18N::percentage(Functions::safeDivision($genData['sum'] + $genData['other'], $genData['sum'] + $genData['other'] + $genData['unknown']),1)) . 
45
+				'</td>
46 46
                  <td class="optionbox left">'.
47
-                    ($display_all_places ? 
48
-                        $this->htmlGenerationAllPlacesRow($genData, $analysis_level) :
49
-                        $this->htmlGenerationTopPlacesRow($genData, $analysis_level)
50
-                     ) .
51
-                '</ditdv>
47
+					($display_all_places ? 
48
+						$this->htmlGenerationAllPlacesRow($genData, $analysis_level) :
49
+						$this->htmlGenerationTopPlacesRow($genData, $analysis_level)
50
+					 ) .
51
+				'</ditdv>
52 52
             </tr>';
53
-        }       
53
+		}       
54 54
         
55
-        $html.= 
56
-            '</table>
55
+		$html.= 
56
+			'</table>
57 57
             <div class="left">
58 58
                 <strong>' . I18N::translate('Interpretation help:') . '</strong>
59 59
                 <br />'.
60
-                I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.') . 
61
-                '<br />';
62
-        if(!is_null($max_details_gen) && $max_details_gen == 0){
63
-            $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 />';
64
-            $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%%.');
65
-        }
66
-        else{
67
-            $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 />';
68
-            $html .= I18N::translate('Only the %d more frequent places for each generation are displayed.', $max_details_gen);
69
-        }
70
-        $html.= 
71
-            '</div>
60
+				I18N::translate('<strong>Generation X (yy %%)</strong>: The percentage indicates the number of found places compared to the total number of ancestors in this generation.') . 
61
+				'<br />';
62
+		if(!is_null($max_details_gen) && $max_details_gen == 0){
63
+			$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 />';
64
+			$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%%.');
65
+		}
66
+		else{
67
+			$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 />';
68
+			$html .= I18N::translate('Only the %d more frequent places for each generation are displayed.', $max_details_gen);
69
+		}
70
+		$html.= 
71
+			'</div>
72 72
         </div>';
73 73
         
74
-        return $html;
75
-    }
74
+		return $html;
75
+	}
76 76
     
77 77
     
78
-    /**
79
-     * Return the HTML code to display a row with all places found in a generation.
80
-     *
81
-     * @param array $data Data array
82
-     * @param int $analysis_level Level of subdivision of analysis
83
-     * @return string HTML code for all places row
84
-     */
85
-    protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
86
-        $html =
87
-        '<table class="geodispersion_bigrow">
78
+	/**
79
+	 * Return the HTML code to display a row with all places found in a generation.
80
+	 *
81
+	 * @param array $data Data array
82
+	 * @param int $analysis_level Level of subdivision of analysis
83
+	 * @return string HTML code for all places row
84
+	 */
85
+	protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
86
+		$html =
87
+		'<table class="geodispersion_bigrow">
88 88
             <tr>';
89 89
         
90
-        $sum_gen = $data['sum'];
91
-        $unknownother = $data['unknown'] + $data['other'];
92
-        foreach($data['places'] as $placename=> $dataplace){
93
-            $levels = array_map('trim',explode(',', $placename));
94
-            $content = '';
95
-            if(isset($dataplace['flag'])){
96
-                $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
97
-            }
98
-            else{
99
-                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
100
-            }
101
-            $count = $dataplace['count'];
102
-            $content .= I18N::number($count);
103
-            $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
104
-            $perc2= Functions::safeDivision($count, $sum_gen);
105
-            if($perc2>=0.1) 
106
-                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
107
-            $content .= '</td>';
90
+		$sum_gen = $data['sum'];
91
+		$unknownother = $data['unknown'] + $data['other'];
92
+		foreach($data['places'] as $placename=> $dataplace){
93
+			$levels = array_map('trim',explode(',', $placename));
94
+			$content = '';
95
+			if(isset($dataplace['flag'])){
96
+				$content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
97
+			}
98
+			else{
99
+				$content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
100
+			}
101
+			$count = $dataplace['count'];
102
+			$content .= I18N::number($count);
103
+			$perc = Functions::safeDivision($count, $sum_gen + $unknownother);
104
+			$perc2= Functions::safeDivision($count, $sum_gen);
105
+			if($perc2>=0.1) 
106
+				$content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
107
+			$content .= '</td>';
108 108
                
109
-            $html .= '
109
+			$html .= '
110 110
                 <td class="geodispersion_rowitem" width="'.max(round(100*$perc, 0),1).'%">
111 111
                     <table>
112 112
                         <tr>
@@ -118,46 +118,46 @@  discard block
 block discarded – undo
118 118
                         </tr>
119 119
                     </table>
120 120
                 </td>';
121
-        }
121
+		}
122 122
         
123
-        if($unknownother>0){
124
-            $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
125
-            $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
126
-            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
127
-            $html .='</td>';
128
-        }
123
+		if($unknownother>0){
124
+			$perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
125
+			$html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
126
+			if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
127
+			$html .='</td>';
128
+		}
129 129
         
130
-        $html .= 
131
-            '</tr>
130
+		$html .= 
131
+			'</tr>
132 132
         </table>';
133
-        return $html;
134
-    }
133
+		return $html;
134
+	}
135 135
     
136 136
 	/**
137 137
 	 * Returns the HTML code fo display a row of the Top Places found for a generation.
138 138
 	 *
139 139
 	 * @param array $data Data array
140
-     * @param int $analysis_level Level of subdivision of analysis
140
+	 * @param int $analysis_level Level of subdivision of analysis
141 141
 	 * @return string HTML code for Top Places row
142 142
 	 */
143
-    protected function htmlGenerationTopPlacesRow($data, $analysis_level) {
144
-        $tmp_places = array();
145
-        $sum_gen = $data['sum'];
146
-        $other = $data['other'];
143
+	protected function htmlGenerationTopPlacesRow($data, $analysis_level) {
144
+		$tmp_places = array();
145
+		$sum_gen = $data['sum'];
146
+		$other = $data['other'];
147 147
         
148
-        foreach($data['places'] as $placename => $count) {
149
-            if($placename != 'other'){
150
-                $levels = array_map('trim',explode(',', $placename));
151
-                $placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
152
-            }
153
-            else{
154
-                $placename = I18N::translate('Other places');
155
-            }
156
-            $tmp_places[] = I18N::translate('<strong>%s</strong> [%d - %s]', $placename, $count, I18N::percentage(Functions::safeDivision($count, $sum_gen + $other), 1));         	
157
-        }
148
+		foreach($data['places'] as $placename => $count) {
149
+			if($placename != 'other'){
150
+				$levels = array_map('trim',explode(',', $placename));
151
+				$placename = '<span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span>';
152
+			}
153
+			else{
154
+				$placename = I18N::translate('Other places');
155
+			}
156
+			$tmp_places[] = I18N::translate('<strong>%s</strong> [%d - %s]', $placename, $count, I18N::percentage(Functions::safeDivision($count, $sum_gen + $other), 1));         	
157
+		}
158 158
         
159
-        return implode(I18N::$list_separator, $tmp_places);
160
-    }
159
+		return implode(I18N::$list_separator, $tmp_places);
160
+	}
161 161
     
162 162
 }
163 163
  
164 164
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGeneralMapView.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
 	 * {@inheritDoc}
26 26
 	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisTabGeneralView::htmlAnalysisData()
27 27
 	 */
28
-    protected function htmlAnalysisData() {
28
+	protected function htmlAnalysisData() {
29 29
         
30
-        /** @var OutlineMap $map */
31
-        $map = $this->data->get('map');
32
-        $canvas = $map->getCanvas();
33
-        $subdvisions_results = $this->data->get('results_by_subdivisions');
30
+		/** @var OutlineMap $map */
31
+		$map = $this->data->get('map');
32
+		$canvas = $map->getCanvas();
33
+		$subdvisions_results = $this->data->get('results_by_subdivisions');
34 34
         
35
-        $nb_found = $this->data->get('stats_gen_nb_found');
36
-        $nb_other = $this->data->get('stats_gen_nb_other');
35
+		$nb_found = $this->data->get('stats_gen_nb_found');
36
+		$nb_other = $this->data->get('stats_gen_nb_other');
37 37
         
38
-        $html = '<script>
38
+		$html = '<script>
39 39
 			var tip = null;
40 40
 			var tipText = "";
41 41
 			var over = false;
@@ -82,29 +82,29 @@  discard block
 block discarded – undo
82 82
 				var map = {};
83 83
 		';
84 84
         
85
-        foreach($subdvisions_results as $name => $location){
86
-            $html.= 'map.area'.$location['id'].' = paper.path("'.$location['coord'].'").attr(attr);';
87
-            if(isset($location['transparency'])) {
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/>';
90
-                $textToolTip .= I18N::translate('%d individuals', $location['count']).'<br/>'.I18N::percentage(Functions::safeDivision($location['count'], $nb_found - $nb_other), 1);
91
-                $html.= 'addTip(map.area'.$location['id'].'.node, "'.Filter::escapeJs($textToolTip).'");';
92
-                $html.= 'map.area'.$location['id'].'.attr({"fill" : "'. $canvas->max_color .'", "fill-opacity" : '.$location['transparency'].' });';
93
-                $html.= 'map.area'.$location['id'].'.mouseover(function () {'.
94
-                    'map.area'.$location['id'].'.stop().animate({"fill" : "'. $canvas->hover_color .'", "fill-opacity" : 1}, 100, "linear");'.
95
-                    '});'.
96
-                    'map.area'.$location['id'].'.mouseout(function () {'.
97
-                    'map.area'.$location['id'].'.stop().animate({"fill" : "'.$canvas->max_color.'", "fill-opacity" : '.$location['transparency'].'}, 100, "linear");'.
98
-                    '});';
99
-            }
100
-        }
101
-        $html .= '});
85
+		foreach($subdvisions_results as $name => $location){
86
+			$html.= 'map.area'.$location['id'].' = paper.path("'.$location['coord'].'").attr(attr);';
87
+			if(isset($location['transparency'])) {
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/>';
90
+				$textToolTip .= I18N::translate('%d individuals', $location['count']).'<br/>'.I18N::percentage(Functions::safeDivision($location['count'], $nb_found - $nb_other), 1);
91
+				$html.= 'addTip(map.area'.$location['id'].'.node, "'.Filter::escapeJs($textToolTip).'");';
92
+				$html.= 'map.area'.$location['id'].'.attr({"fill" : "'. $canvas->max_color .'", "fill-opacity" : '.$location['transparency'].' });';
93
+				$html.= 'map.area'.$location['id'].'.mouseover(function () {'.
94
+					'map.area'.$location['id'].'.stop().animate({"fill" : "'. $canvas->hover_color .'", "fill-opacity" : 1}, 100, "linear");'.
95
+					'});'.
96
+					'map.area'.$location['id'].'.mouseout(function () {'.
97
+					'map.area'.$location['id'].'.stop().animate({"fill" : "'.$canvas->max_color.'", "fill-opacity" : '.$location['transparency'].'}, 100, "linear");'.
98
+					'});';
99
+			}
100
+		}
101
+		$html .= '});
102 102
             </script>
103 103
             
104 104
             <div id="geodispersion_map"></div>
105 105
     	   <div id="geodispersion_tip"></div>';
106 106
         
107
-        return $html;
108
-    }
107
+		return $html;
108
+	}
109 109
     
110 110
 } 
111 111
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -75,23 +75,23 @@
 block discarded – undo
75 75
 				    }
76 76
 				});
77 77
 
78
-				var paper = new Raphael(document.getElementById("geodispersion_map"), '. $canvas->width .', '. $canvas->height .');
79
-				var background = paper.rect(0, 0, ' . $canvas->width . ', '. $canvas->height . ');
80
-				background.attr({"fill" : "'. $canvas->background_color .'", "stroke" : "'. $canvas->background_stroke .'", "stroke-width": 1, "stroke-linejoin": "round" });
81
-				var attr = { fill: "'. $canvas->default_color .'", stroke: "'. $canvas->default_stroke .'", "stroke-width": 1, "stroke-linejoin": "round" };
78
+				var paper = new Raphael(document.getElementById("geodispersion_map"), '. $canvas->width.', '.$canvas->height.');
79
+				var background = paper.rect(0, 0, ' . $canvas->width.', '.$canvas->height.');
80
+				background.attr({"fill" : "'. $canvas->background_color.'", "stroke" : "'.$canvas->background_stroke.'", "stroke-width": 1, "stroke-linejoin": "round" });
81
+				var attr = { fill: "'. $canvas->default_color.'", stroke: "'.$canvas->default_stroke.'", "stroke-width": 1, "stroke-linejoin": "round" };
82 82
 				var map = {};
83 83
 		';
84 84
         
85
-        foreach($subdvisions_results as $name => $location){
86
-            $html.= 'map.area'.$location['id'].' = paper.path("'.$location['coord'].'").attr(attr);';
87
-            if(isset($location['transparency'])) {
85
+        foreach ($subdvisions_results as $name => $location) {
86
+            $html .= 'map.area'.$location['id'].' = paper.path("'.$location['coord'].'").attr(attr);';
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'] != '') $textToolTip .= '<span class="geodispersion_flag">'.FunctionsPrint::htmlPlaceIcon($location['place'], $location['flag']).'</span><br/>';
90 90
                 $textToolTip .= I18N::translate('%d individuals', $location['count']).'<br/>'.I18N::percentage(Functions::safeDivision($location['count'], $nb_found - $nb_other), 1);
91
-                $html.= 'addTip(map.area'.$location['id'].'.node, "'.Filter::escapeJs($textToolTip).'");';
92
-                $html.= 'map.area'.$location['id'].'.attr({"fill" : "'. $canvas->max_color .'", "fill-opacity" : '.$location['transparency'].' });';
93
-                $html.= 'map.area'.$location['id'].'.mouseover(function () {'.
94
-                    'map.area'.$location['id'].'.stop().animate({"fill" : "'. $canvas->hover_color .'", "fill-opacity" : 1}, 100, "linear");'.
91
+                $html .= 'addTip(map.area'.$location['id'].'.node, "'.Filter::escapeJs($textToolTip).'");';
92
+                $html .= 'map.area'.$location['id'].'.attr({"fill" : "'.$canvas->max_color.'", "fill-opacity" : '.$location['transparency'].' });';
93
+                $html .= 'map.area'.$location['id'].'.mouseover(function () {'.
94
+                    'map.area'.$location['id'].'.stop().animate({"fill" : "'.$canvas->hover_color.'", "fill-opacity" : 1}, 100, "linear");'.
95 95
                     '});'.
96 96
                     'map.area'.$location['id'].'.mouseout(function () {'.
97 97
                     'map.area'.$location['id'].'.stop().animate({"fill" : "'.$canvas->max_color.'", "fill-opacity" : '.$location['transparency'].'}, 100, "linear");'.
Please login to merge, or discard this 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/AdminConfigView.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 	 * {@inhericDoc}
24 24
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
25 25
 	 */
26
-    protected function renderContent() {
26
+	protected function renderContent() {
27 27
         
28
-        /** @var Tree $tree  */
29
-        $tree = $this->data->get('tree');
30
-        $root_url = $this->data->get('root_url');
31
-        $other_trees = $this->data->get('other_trees');
32
-        $table_id = $this->data->get('table_id');
33
-        ?>        
28
+		/** @var Tree $tree  */
29
+		$tree = $this->data->get('tree');
30
+		$root_url = $this->data->get('root_url');
31
+		$other_trees = $this->data->get('other_trees');
32
+		$table_id = $this->data->get('table_id');
33
+		?>        
34 34
         <ol class="breadcrumb small">
35 35
         	<li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li>
36 36
 			<li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li>
@@ -63,23 +63,23 @@  discard block
 block discarded – undo
63 63
 		<p>
64 64
 		<?php $places_hierarchy = $this->data->get('places_hierarchy'); 
65 65
 		if($places_hierarchy) {
66
-		    switch ($places_hierarchy['type']) {
67
-		        case 'header':
68
-		            echo I18N::translate('According to the GEDCOM header, the places within your file follows the structure: ');
69
-		            break;
70
-		        case 'data':
71
-		            echo I18N::translate('Your GEDCOM header does not contain any indication of place structure.').
72
-		            '<br/>'.
73
-		            I18N::translate('Here is an example of your place data: ');
74
-		            break;
75
-		        default:
76
-		            break;
77
-		    }
78
-		    $str_hierarchy = array();
79
-		    foreach($places_hierarchy['hierarchy'] as $key => $level) {
80
-		        $str_hierarchy[] = I18N::translate('(%d) %s', $key + 1, $level);
81
-		    }
82
-		    echo '<strong>' . implode(I18N::$list_separator, $str_hierarchy) . '</strong>';
66
+			switch ($places_hierarchy['type']) {
67
+				case 'header':
68
+					echo I18N::translate('According to the GEDCOM header, the places within your file follows the structure: ');
69
+					break;
70
+				case 'data':
71
+					echo I18N::translate('Your GEDCOM header does not contain any indication of place structure.').
72
+					'<br/>'.
73
+					I18N::translate('Here is an example of your place data: ');
74
+					break;
75
+				default:
76
+					break;
77
+			}
78
+			$str_hierarchy = array();
79
+			foreach($places_hierarchy['hierarchy'] as $key => $level) {
80
+				$str_hierarchy[] = I18N::translate('(%d) %s', $key + 1, $level);
81
+			}
82
+			echo '<strong>' . implode(I18N::$list_separator, $str_hierarchy) . '</strong>';
83 83
 		}
84 84
 		?>
85 85
 		</p>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         </a>
110 110
 		
111 111
 		<?php        
112
-    }
112
+	}
113 113
     
114 114
 }
115 115
  
116 116
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
 		
42 42
 		<h2>
43 43
 			<?php echo $tree->getTitleHtml(); ?>
44
-			<?php if(count($other_trees) > 0) {?>
44
+			<?php if (count($other_trees) > 0) {?>
45 45
 			<div class="btn-group">
46 46
 				<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
47 47
 					<?php echo I18N::translate('Change tree'); ?>
48 48
 					<span class="caret"></span>
49 49
 				</button>
50
-				<?php foreach($other_trees as $other_tree) { ?>
50
+				<?php foreach ($other_trees as $other_tree) { ?>
51 51
 				<ul class="dropdown-menu" role="menu">
52 52
 					<li>
53
-						<a href="<?php echo $root_url . '&ged=' . $other_tree->getNameUrl(); ?>">
53
+						<a href="<?php echo $root_url.'&ged='.$other_tree->getNameUrl(); ?>">
54 54
 							<i class="fa fa-fw fa-tree"></i>&nbsp;<?php echo $other_tree->getTitleHtml(); ?>
55 55
 						</a>
56 56
 					</li>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		
63 63
 		<p>
64 64
 		<?php $places_hierarchy = $this->data->get('places_hierarchy'); 
65
-		if($places_hierarchy) {
65
+		if ($places_hierarchy) {
66 66
 		    switch ($places_hierarchy['type']) {
67 67
 		        case 'header':
68 68
 		            echo I18N::translate('According to the GEDCOM header, the places within your file follows the structure: ');
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 		            break;
77 77
 		    }
78 78
 		    $str_hierarchy = array();
79
-		    foreach($places_hierarchy['hierarchy'] as $key => $level) {
79
+		    foreach ($places_hierarchy['hierarchy'] as $key => $level) {
80 80
 		        $str_hierarchy[] = I18N::translate('(%d) %s', $key + 1, $level);
81 81
 		    }
82
-		    echo '<strong>' . implode(I18N::$list_separator, $str_hierarchy) . '</strong>';
82
+		    echo '<strong>'.implode(I18N::$list_separator, $str_hierarchy).'</strong>';
83 83
 		}
84 84
 		?>
85 85
 		</p>
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     		</tbody>
104 104
     	</table>
105 105
     	
106
-        <a type="button" class="btn btn-primary" href="<?php echo $root_url . '@add&ged=' . $tree->getNameUrl(); ?>" title="<?php echo I18N::translate('Add'); ?>">
106
+        <a type="button" class="btn btn-primary" href="<?php echo $root_url.'@add&ged='.$tree->getNameUrl(); ?>" title="<?php echo I18N::translate('Add'); ?>">
107 107
         	<i class="fa fa-plus"></i>
108 108
         	<?php echo I18N::translate('Add'); ?>
109 109
         </a>
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisListView.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 	 * {@inhericDoc}
24 24
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
25 25
 	 */
26
-    protected function renderContent() {        
27
-        ?>                
26
+	protected function renderContent() {        
27
+		?>                
28 28
         <div id="maj-geodisp-list-page" class="center">
29 29
 			<h2><?php echo $this->data->get('title'); ?></h2>
30 30
 			
31 31
 			<?php
32 32
 			if($this->data->get('has_list', false)) { 
33
-    		    $galist = $this->data->get('geoanalysislist');
34
-    		?>
33
+				$galist = $this->data->get('geoanalysislist');
34
+			?>
35 35
     		
36 36
     		<p class="center"><?php echo I18N::translate('Choose a geographical dispersion analysis:'); ?><p>
37 37
 			
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     	</div>
59 59
     	
60 60
     	<?php 
61
-    }
61
+	}
62 62
     
63 63
 }
64 64
  
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
 			<h2><?php echo $this->data->get('title'); ?></h2>
30 30
 			
31 31
 			<?php
32
-			if($this->data->get('has_list', false)) { 
32
+			if ($this->data->get('has_list', false)) { 
33 33
     		    $galist = $this->data->get('geoanalysislist');
34 34
     		?>
35 35
     		
36 36
     		<p class="center"><?php echo I18N::translate('Choose a geographical dispersion analysis:'); ?><p>
37 37
 			
38 38
 			<div class="maj-table">
39
-				<?php foreach($galist as $ga) {?>
39
+				<?php foreach ($galist as $ga) {?>
40 40
 				<div class="maj-row">
41 41
 					<div class="label">	
42
-						<?php if($ga->hasMap()) { ?>
42
+						<?php if ($ga->hasMap()) { ?>
43 43
 						<i class="icon-maj-map" title="<?php echo I18N::translate('Map'); ?>"></i>
44 44
 						<?php } else { ?>
45 45
 						<i class="icon-maj-table" title="<?php echo I18N::translate('Table'); ?>"></i>
Please login to merge, or discard this patch.
Webtrees/Module/GeoDispersion/Views/AbstractGeoAnalysisTabGeneralView.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -25,27 +25,27 @@  discard block
 block discarded – undo
25 25
 	 * {@inhericDoc}
26 26
 	 * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
27 27
 	 */
28
-    protected function renderContent() {
29
-        $nb_found = $this->data->get('stats_gen_nb_found');
30
-        $nb_other = $this->data->get('stats_gen_nb_other');
31
-        $nb_unknown = $this->data->get('stats_gen_nb_unknown');
32
-        $perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown);
28
+	protected function renderContent() {
29
+		$nb_found = $this->data->get('stats_gen_nb_found');
30
+		$nb_other = $this->data->get('stats_gen_nb_other');
31
+		$nb_unknown = $this->data->get('stats_gen_nb_unknown');
32
+		$perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown);
33 33
 
34
-        $html = '<div id="geodispersion_summary">
34
+		$html = '<div id="geodispersion_summary">
35 35
         	<div class="maj-table center">
36 36
         		<div class="maj-row">
37 37
         			<div class="label">' . I18N::translate('Places found'). '</div>
38 38
         			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_found - $nb_other, I18N::percentage($perc_known)). '</div>
39 39
         		</div>';
40
-        if($nb_other > 0){
41
-            $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown);
42
-            $html .=
43
-        		'<div class="maj-row">
40
+		if($nb_other > 0){
41
+			$perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown);
42
+			$html .=
43
+				'<div class="maj-row">
44 44
         			<div class="label">' . I18N::translate('Other places'). '</div>
45 45
         			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_other, I18N::percentage($perc_other)). '</div>
46 46
         		</div>';
47
-        }
48
-        $html .= '<div class="maj-row">
47
+		}
48
+		$html .= '<div class="maj-row">
49 49
         			<div class="label">' . I18N::translate('Places not found'). '</div>
50 50
         			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_unknown, I18N::percentage(1 - $perc_known)). '</div>
51 51
         		</div>
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 		' . $this->htmlAnalysisData(). '
57 57
 		</div>';
58 58
         
59
-        return $html;
60
-    }
59
+		return $html;
60
+	}
61 61
     
62 62
 	/**
63 63
 	 * Returns HTML code to display the analysis data, under the appropriate format.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @return string HTML Code for analysis display
66 66
 	 * @abstract
67 67
 	 */
68
-    protected abstract function htmlAnalysisData();        
68
+	protected abstract function htmlAnalysisData();        
69 69
     
70 70
 }
71 71
  
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,26 +34,26 @@
 block discarded – undo
34 34
         $html = '<div id="geodispersion_summary">
35 35
         	<div class="maj-table center">
36 36
         		<div class="maj-row">
37
-        			<div class="label">' . I18N::translate('Places found'). '</div>
38
-        			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_found - $nb_other, I18N::percentage($perc_known)). '</div>
37
+        			<div class="label">' . I18N::translate('Places found').'</div>
38
+        			<div class="value">' . I18N::translate('%1$d (%2$s)', $nb_found - $nb_other, I18N::percentage($perc_known)).'</div>
39 39
         		</div>';
40
-        if($nb_other > 0){
40
+        if ($nb_other > 0) {
41 41
             $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown);
42 42
             $html .=
43 43
         		'<div class="maj-row">
44
-        			<div class="label">' . I18N::translate('Other places'). '</div>
45
-        			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_other, I18N::percentage($perc_other)). '</div>
44
+        			<div class="label">' . I18N::translate('Other places').'</div>
45
+        			<div class="value">' . I18N::translate('%1$d (%2$s)', $nb_other, I18N::percentage($perc_other)).'</div>
46 46
         		</div>';
47 47
         }
48 48
         $html .= '<div class="maj-row">
49
-        			<div class="label">' . I18N::translate('Places not found'). '</div>
50
-        			<div class="value">' . I18N::translate('%1$d (%2$s)',$nb_unknown, I18N::percentage(1 - $perc_known)). '</div>
49
+        			<div class="label">' . I18N::translate('Places not found').'</div>
50
+        			<div class="value">' . I18N::translate('%1$d (%2$s)', $nb_unknown, I18N::percentage(1 - $perc_known)).'</div>
51 51
         		</div>
52 52
         	</div>
53 53
         </div>
54 54
         <br/>
55 55
 		<div id="geodispersion_data">
56
-		' . $this->htmlAnalysisData(). '
56
+		' . $this->htmlAnalysisData().'
57 57
 		</div>';
58 58
         
59 59
         return $html;
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGeneralTableView.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -22,44 +22,44 @@
 block discarded – undo
22 22
 	 * {@inheritDoc}
23 23
 	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisTabGeneralView::htmlAnalysisData()
24 24
 	 */
25
-    protected function htmlAnalysisData() {
26
-        $results = $this->data->get('results');
27
-        $analysis_level = $this->data->get('analysis_level');
25
+	protected function htmlAnalysisData() {
26
+		$results = $this->data->get('results');
27
+		$analysis_level = $this->data->get('analysis_level');
28 28
         
29
-        $nb_found = $this->data->get('stats_gen_nb_found');
30
-        $nb_other = $this->data->get('stats_gen_nb_other');
29
+		$nb_found = $this->data->get('stats_gen_nb_found');
30
+		$nb_other = $this->data->get('stats_gen_nb_other');
31 31
         
32
-        $i=1;
33
-        $previous_nb=0;        
32
+		$i=1;
33
+		$previous_nb=0;        
34 34
         
35
-        $html='<div class="maj-table center">';        
36
-        foreach($results as $place => $nb){
37
-            $perc = Functions::safeDivision($nb, $nb_found - $nb_other);
38
-            if($nb!=$previous_nb){
39
-                $j= I18N::number($i);
40
-            }
41
-            else{
42
-                $j='&nbsp;';
43
-            }
35
+		$html='<div class="maj-table center">';        
36
+		foreach($results as $place => $nb){
37
+			$perc = Functions::safeDivision($nb, $nb_found - $nb_other);
38
+			if($nb!=$previous_nb){
39
+				$j= I18N::number($i);
40
+			}
41
+			else{
42
+				$j='&nbsp;';
43
+			}
44 44
             	
45
-            $levels = array_map('trim',explode(',', $place));
46
-            $placename = $levels[$analysis_level-1];
47
-            if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]);
48
-            $html.=
49
-            '<div class="maj-row">
45
+			$levels = array_map('trim',explode(',', $place));
46
+			$placename = $levels[$analysis_level-1];
47
+			if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]);
48
+			$html.=
49
+			'<div class="maj-row">
50 50
                 <div class="label"><strong>'.$j.'</strong></div>
51 51
                 <div class="label">'.$placename.'</div>
52 52
                 <div class="value">'.I18N::translate('%d',$nb).'</div>
53 53
                 <div class="value">'.I18N::percentage($perc,1).'</div>
54 54
              </div>';
55
-            $i++;
56
-            $previous_nb=$nb;
57
-        }
55
+			$i++;
56
+			$previous_nb=$nb;
57
+		}
58 58
         
59
-        $html.='</div>';
59
+		$html.='</div>';
60 60
         
61
-        return $html;
62
-    }
61
+		return $html;
62
+	}
63 63
     
64 64
 }
65 65
  
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,34 +29,34 @@
 block discarded – undo
29 29
         $nb_found = $this->data->get('stats_gen_nb_found');
30 30
         $nb_other = $this->data->get('stats_gen_nb_other');
31 31
         
32
-        $i=1;
33
-        $previous_nb=0;        
32
+        $i = 1;
33
+        $previous_nb = 0;        
34 34
         
35
-        $html='<div class="maj-table center">';        
36
-        foreach($results as $place => $nb){
35
+        $html = '<div class="maj-table center">';        
36
+        foreach ($results as $place => $nb) {
37 37
             $perc = Functions::safeDivision($nb, $nb_found - $nb_other);
38
-            if($nb!=$previous_nb){
39
-                $j= I18N::number($i);
38
+            if ($nb != $previous_nb) {
39
+                $j = I18N::number($i);
40 40
             }
41
-            else{
42
-                $j='&nbsp;';
41
+            else {
42
+                $j = '&nbsp;';
43 43
             }
44 44
             	
45
-            $levels = array_map('trim',explode(',', $place));
46
-            $placename = $levels[$analysis_level-1];
47
-            if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]);
48
-            $html.=
45
+            $levels = array_map('trim', explode(',', $place));
46
+            $placename = $levels[$analysis_level - 1];
47
+            if ($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level - 2]);
48
+            $html .=
49 49
             '<div class="maj-row">
50 50
                 <div class="label"><strong>'.$j.'</strong></div>
51 51
                 <div class="label">'.$placename.'</div>
52
-                <div class="value">'.I18N::translate('%d',$nb).'</div>
53
-                <div class="value">'.I18N::percentage($perc,1).'</div>
52
+                <div class="value">'.I18N::translate('%d', $nb).'</div>
53
+                <div class="value">'.I18N::percentage($perc, 1).'</div>
54 54
              </div>';
55 55
             $i++;
56
-            $previous_nb=$nb;
56
+            $previous_nb = $nb;
57 57
         }
58 58
         
59
-        $html.='</div>';
59
+        $html .= '</div>';
60 60
         
61 61
         return $html;
62 62
     }
Please login to merge, or discard this 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.
src/Webtrees/Module/Certificates/Model/CertificateProviderInterface.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -17,41 +17,41 @@
 block discarded – undo
17 17
  */
18 18
 interface CertificateProviderInterface  {
19 19
     
20
-    /**
21
-     * Returns the certificates directory path as it is really (within the firewall directory).
22
-     *
23
-     * @return string Real certificates directory path
24
-     */
25
-    function getRealCertificatesDirectory();
20
+	/**
21
+	 * Returns the certificates directory path as it is really (within the firewall directory).
22
+	 *
23
+	 * @return string Real certificates directory path
24
+	 */
25
+	function getRealCertificatesDirectory();
26 26
     
27
-    /**
28
-     * Returns an array of the folders (cities) in the certificate directory.
29
-     * Cities name are UTF8 encoded.
30
-     *
31
-     * @return array Array of cities name
32
-     */
33
-    function getCitiesList();
27
+	/**
28
+	 * Returns an array of the folders (cities) in the certificate directory.
29
+	 * Cities name are UTF8 encoded.
30
+	 *
31
+	 * @return array Array of cities name
32
+	 */
33
+	function getCitiesList();
34 34
     
35
-    /**
36
-     * Returns the list of available certificates for a specified city.
37
-     * Format of the list :
38
-     * < file name , date of the certificate , type of certificate , name of the certificate >
39
-     * Data are UTF8 encoded.
40
-     *
41
-     * @param string $selCity City to look in
42
-     * @return array List of certificates
43
-     */
44
-    function getCertificatesList($selCity);
35
+	/**
36
+	 * Returns the list of available certificates for a specified city.
37
+	 * Format of the list :
38
+	 * < file name , date of the certificate , type of certificate , name of the certificate >
39
+	 * Data are UTF8 encoded.
40
+	 *
41
+	 * @param string $selCity City to look in
42
+	 * @return array List of certificates
43
+	 */
44
+	function getCertificatesList($selCity);
45 45
     
46
-    /**
47
-     * Return the list of certificates from a city $city and containing the characters $contains
48
-     *
49
-     * @param string $city City to search in
50
-     * @param string $contains Characters to match
51
-     * @param string $limit Maximum number of results
52
-     * @return array Array of matching certificates
53
-     */
54
-    function getCertificatesListBeginWith($city, $contains, $limit);
46
+	/**
47
+	 * Return the list of certificates from a city $city and containing the characters $contains
48
+	 *
49
+	 * @param string $city City to search in
50
+	 * @param string $contains Characters to match
51
+	 * @param string $limit Maximum number of results
52
+	 * @return array Array of matching certificates
53
+	 */
54
+	function getCertificatesListBeginWith($city, $contains, $limit);
55 55
     
56 56
 }
57 57
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 /**
16 16
  * Interface for providers of certificates
17 17
  */
18
-interface CertificateProviderInterface  {
18
+interface CertificateProviderInterface {
19 19
     
20 20
     /**
21 21
      * Returns the certificates directory path as it is really (within the firewall directory).
Please login to merge, or discard this patch.