Completed
Push — master ( f93e28...a26fec )
by Jonathan
07:20 queued 04:02
created
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() . '&mod_action=SosaConfig';
80
+        return 'module.php?mod='.$this->getName().'&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.
src/Webtrees/Module/MiscExtensionsModule.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
60 60
      */
61 61
     public function getConfigLink() {
62
-        return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
62
+        return 'module.php?mod='.$this->getName().'&amp;mod_action=AdminConfig';
63 63
     }
64 64
     
65 65
     /**
@@ -88,19 +88,19 @@  discard block
 block discarded – undo
88 88
 	    $res = '';
89 89
 	    $dindi = new Individual($ctrlIndi->getSignificantIndividual());
90 90
 	    $titles = $dindi->getTitles();
91
-	    if(count($titles)>0){
91
+	    if (count($titles) > 0) {
92 92
 	        $res = '
93 93
 	            <dl>
94 94
 	               <dt class="label">'.I18N::translate('Titles').'</dt>';
95
-            foreach($titles as $title=>$props){
95
+            foreach ($titles as $title=>$props) {
96 96
                 $res .= 
97
-                    '<dd class="field">' . $title. ' ' .
98
-                    FunctionsPrint::getListFromArray($props) .
97
+                    '<dd class="field">'.$title.' '.
98
+                    FunctionsPrint::getListFromArray($props).
99 99
                     '</dd>';
100 100
             }
101
-            $res .=  '</dl>';
101
+            $res .= '</dl>';
102 102
         }
103
-	    return array( 'indi-header-titles' , $res);	    
103
+	    return array('indi-header-titles', $res);	    
104 104
 	}
105 105
 	
106 106
 	/**
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 	    global $WT_TREE;
118 118
 	    
119 119
 	    $html = '';
120
-	    if($this->getSetting('MAJ_ADD_HTML_HEADER', 0) == 1){
121
-	        if(Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE)  && !Filter::getBool('noheader')){
120
+	    if ($this->getSetting('MAJ_ADD_HTML_HEADER', 0) == 1) {
121
+	        if (Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE) && !Filter::getBool('noheader')) {
122 122
 	            $html .= $this->getSetting('MAJ_HTML_HEADER', '');
123 123
 	        }
124 124
 	    }	
@@ -133,19 +133,19 @@  discard block
 block discarded – undo
133 133
 	    global $WT_TREE;
134 134
 	     
135 135
 	    $html = '';
136
-	    if($this->getSetting('MAJ_DISPLAY_CNIL', 0) == 1){
136
+	    if ($this->getSetting('MAJ_DISPLAY_CNIL', 0) == 1) {
137 137
 	        $html .= '<br/>';
138 138
 	        $html .= '<div class="center">';
139 139
 	        $cnil_ref = $this->getSetting('MAJ_CNIL_REFERENCE', '');
140
-	        if($cnil_ref != ''){
140
+	        if ($cnil_ref != '') {
141 141
 	            $html .= I18N::translate('This site has been notified to the French National Commission for Data protection (CNIL) and registered under number %s. ', $cnil_ref);
142 142
 	        }
143 143
 	        $html .= I18N::translate('In accordance with the French Data protection Act (<em>Loi Informatique et Libertés</em>) of January 6th, 1978, you have the right to access, modify, rectify and delete personal information that pertains to you. To exercice this right, please contact %s, and provide your name, address and a proof of your identity.', Theme::theme()->contactLink(User::find($WT_TREE->getPreference('WEBMASTER_USER_ID'))));
144 144
 	        $html .= '</div>';
145 145
 	    }
146 146
 	    
147
-	    if($this->getSetting('MAJ_ADD_HTML_FOOTER', 0) == 1){
148
-	        if(Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE)  && !Filter::getBool('nofooter')){
147
+	    if ($this->getSetting('MAJ_ADD_HTML_FOOTER', 0) == 1) {
148
+	        if (Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE) && !Filter::getBool('nofooter')) {
149 149
 	            $html .= $this->getSetting('MAJ_HTML_FOOTER', '');
150 150
 	        }
151 151
 	    }
Please login to merge, or discard this patch.
src/Webtrees/Module/HooksModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function getConfigLink() {
55 55
         Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
56 56
         
57
-        return 'module.php?mod=' . $this->getName() . '&amp;mod_action=AdminConfig';
57
+        return 'module.php?mod='.$this->getName().'&amp;mod_action=AdminConfig';
58 58
     }
59 59
     
60 60
 
Please login to merge, or discard this patch.
src/Webtrees/Module/ModuleManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@
 block discarded – undo
61 61
      * @see \MyArtJaub\Webtrees\Module\ModuleManagerInterface::isOperational()
62 62
      */
63 63
     public function isOperational($moduleName) {
64
-    	if(!array_key_exists($moduleName, $this->modules_list)) {
65
-    		if($module = fw\Module::getModuleByName($moduleName)) {
66
-    			if($module instanceof DependentInterface) {
67
-    				if($module->validatePrerequisites()) {
64
+    	if (!array_key_exists($moduleName, $this->modules_list)) {
65
+    		if ($module = fw\Module::getModuleByName($moduleName)) {
66
+    			if ($module instanceof DependentInterface) {
67
+    				if ($module->validatePrerequisites()) {
68 68
     					$this->modules_list[$moduleName] = TRUE;
69 69
     					return true;
70 70
     				} else {
Please login to merge, or discard this patch.
src/Webtrees/Module/MiscExtensions/AdminConfigController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     protected function update() {
35 35
         global $WT_TREE;
36 36
     
37
-        if(Auth::isAdmin()){
37
+        if (Auth::isAdmin()) {
38 38
     
39 39
             $this->module->setSetting('MAJ_TITLE_PREFIX', Filter::post('MAJ_TITLE_PREFIX'));
40 40
             
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         global $WT_TREE;
67 67
         
68 68
         $action = Filter::post('action');        
69
-        if($action == 'update' && Filter::checkCsrf()) $this->update();
69
+        if ($action == 'update' && Filter::checkCsrf()) $this->update();
70 70
         
71 71
         Theme::theme(new AdministrationTheme)->init($WT_TREE);        
72 72
         $ctrl = new PageController();
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Model/GeoDisplayOptions.php 1 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
      * @return (OutlineMap|null)
46 46
      */
47
-    public function getMap(){
47
+    public function getMap() {
48 48
         return $this->map;
49 49
     }
50 50
     
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return int
66 66
 	 */
67
-    public function getMapLevel(){
67
+    public function getMapLevel() {
68 68
         return $this->map_level;
69 69
     }
70 70
     
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 *
85 85
 	 * @return bool
86 86
 	 */
87
-    public function isUsingFlags(){
87
+    public function isUsingFlags() {
88 88
         return $this->use_flags;
89 89
     }
90 90
     
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 *
105 105
 	 * @return int
106 106
 	 */
107
-    public function getMaxDetailsInGen(){
107
+    public function getMaxDetailsInGen() {
108 108
         return $this->max_details_in_gen;
109 109
     }
110 110
     
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Model/GeoAnalysis.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 * @return string
165 165
 	 */
166 166
 	 public function getHtmlUrl() {
167
-        return 'module.php?mod='. Constants::MODULE_MAJ_GEODISP_NAME . '&mod_action=GeoAnalysis&ga_id=' . $this->getId() . '&ged=' . $this->tree->getNameUrl();
167
+        return 'module.php?mod='.Constants::MODULE_MAJ_GEODISP_NAME.'&mod_action=GeoAnalysis&ga_id='.$this->getId().'&ged='.$this->tree->getNameUrl();
168 168
     }
169 169
     
170 170
     /**
@@ -187,50 +187,50 @@  discard block
 block discarded – undo
187 187
         $placesDispGeneral = null;
188 188
         $placesDispGenerations = null;
189 189
         
190
-        if($sosalist && count($sosalist) > 0) {
190
+        if ($sosalist && count($sosalist) > 0) {
191 191
             $placesDispGeneral['knownsum'] = 0;
192 192
             $placesDispGeneral['unknown'] = 0;
193 193
             $placesDispGeneral['max'] = 0;
194 194
             $placesDispGeneral['places'] = array();
195
-            foreach($sosalist as $sosaid => $gens) {
195
+            foreach ($sosalist as $sosaid => $gens) {
196 196
                 $sosa = Individual::getIntance($sosaid, $this->tree);
197
-                $place =$sosa->getSignificantPlace();
197
+                $place = $sosa->getSignificantPlace();
198 198
                 $genstab = explode(',', $gens);
199
-                $isUnknown=true;
200
-                if($sosa->getDerivedRecord()->canShow() && !is_null($place)){
201
-                    $levels = array_reverse(array_map('trim',explode(',', $place)));
202
-                    if(count($levels)>= $this->analysis_level){                        
199
+                $isUnknown = true;
200
+                if ($sosa->getDerivedRecord()->canShow() && !is_null($place)) {
201
+                    $levels = array_reverse(array_map('trim', explode(',', $place)));
202
+                    if (count($levels) >= $this->analysis_level) {                        
203 203
                         $toplevelvalues = array();
204
-                        if($this->hasMap() && $toplevelvalue = $this->options->getMap()->getTopLevelName()) {
205
-                            $toplevelvalues = array_map('trim',explode(',', strtolower($toplevelvalue)));
204
+                        if ($this->hasMap() && $toplevelvalue = $this->options->getMap()->getTopLevelName()) {
205
+                            $toplevelvalues = array_map('trim', explode(',', strtolower($toplevelvalue)));
206 206
                         }
207
-                        if(!$this->hasMap() 
207
+                        if (!$this->hasMap() 
208 208
                             || is_null($this->options->getMapLevel()) 
209 209
                             || $this->options->getMap()->getTopLevelName() == '*' 
210 210
                             || (
211 211
                                 $this->options->getMapLevel() <= $this->analysis_level 
212 212
                                 && $this->options->getMapLevel() > 0
213 213
                                 && count($levels) >= $this->options->getMapLevel()
214
-                                && in_array(strtolower($levels[$this->options->getMapLevel()-1]), $toplevelvalues)
214
+                                && in_array(strtolower($levels[$this->options->getMapLevel() - 1]), $toplevelvalues)
215 215
                             )
216 216
                         ) {
217 217
                             $placest = implode(I18N::$list_separator, array_slice($levels, 0, $this->analysis_level));
218
-                            if(isset($placesDispGeneral['places'][$placest])) {
218
+                            if (isset($placesDispGeneral['places'][$placest])) {
219 219
                                 $placesDispGeneral['places'][$placest] += 1;
220 220
                             }
221 221
                             else { 
222 222
                                 $placesDispGeneral['places'][$placest] = 1;
223 223
                             }
224
-                            if($placesDispGeneral['places'][$placest]>$placesDispGeneral['max'])
224
+                            if ($placesDispGeneral['places'][$placest] > $placesDispGeneral['max'])
225 225
                                 $placesDispGeneral['max'] = $placesDispGeneral['places'][$placest];
226
-                            foreach($genstab as $gen) {
227
-                                if(isset($placesDispGenerations[$gen]['places'][$placest])) {
226
+                            foreach ($genstab as $gen) {
227
+                                if (isset($placesDispGenerations[$gen]['places'][$placest])) {
228 228
                                     $placesDispGenerations[$gen]['places'][$placest] += 1;
229 229
                                 }
230 230
                                 else { 
231 231
                                     $placesDispGenerations[$gen]['places'][$placest] = 1;
232 232
                                 }
233
-                                if(isset($placesDispGenerations[$gen]['sum'])) {
233
+                                if (isset($placesDispGenerations[$gen]['sum'])) {
234 234
                                     $placesDispGenerations[$gen]['sum'] += 1;
235 235
                                 }
236 236
                                 else { 
@@ -238,15 +238,15 @@  discard block
 block discarded – undo
238 238
                                 }
239 239
                             }
240 240
                         }
241
-                        else{
242
-                            if(isset($placesDispGeneral['other'])) {
241
+                        else {
242
+                            if (isset($placesDispGeneral['other'])) {
243 243
                                 $placesDispGeneral['other'] += 1;
244 244
                             }
245 245
                             else { 
246 246
                                 $placesDispGeneral['other'] = 1;
247 247
                             }
248
-                            foreach($genstab as $gen) {
249
-                                if(isset($placesDispGenerations[$gen]['other'])) {
248
+                            foreach ($genstab as $gen) {
249
+                                if (isset($placesDispGenerations[$gen]['other'])) {
250 250
                                     $placesDispGenerations[$gen]['other'] += 1;
251 251
                                 }
252 252
                                 else { 
@@ -258,10 +258,10 @@  discard block
 block discarded – undo
258 258
                         $isUnknown = false;
259 259
                     }
260 260
                 }
261
-                if($isUnknown){
261
+                if ($isUnknown) {
262 262
                     $placesDispGeneral['unknown'] += 1;
263
-                    foreach($genstab as $gen) {
264
-                        if(isset($placesDispGenerations[$gen]['unknown'])) { 
263
+                    foreach ($genstab as $gen) {
264
+                        if (isset($placesDispGenerations[$gen]['unknown'])) { 
265 265
                             $placesDispGenerations[$gen]['unknown'] += 1;
266 266
                         }
267 267
                         else { 
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Model/OutlineMap.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->is_loaded = false;
71 71
         $this->subdivisions = array();
72 72
         $this->mappings = array();
73
-        if($load) $this->load();
73
+        if ($load) $this->load();
74 74
     }
75 75
     
76 76
     /**
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	 * 
100 100
      */
101 101
     protected function load() {
102
-        if(file_exists(WT_ROOT.WT_MODULES_DIR.Constants::MODULE_MAJ_GEODISP_NAME.'/maps/'.$this->filename)){
102
+        if (file_exists(WT_ROOT.WT_MODULES_DIR.Constants::MODULE_MAJ_GEODISP_NAME.'/maps/'.$this->filename)) {
103 103
             $xml = simplexml_load_file(WT_ROOT.WT_MODULES_DIR.Constants::MODULE_MAJ_GEODISP_NAME.'/maps/'.$this->filename);
104
-            if($xml){
104
+            if ($xml) {
105 105
                 $this->description = trim($xml->displayName);
106 106
                 $this->top_level_name = trim($xml->topLevel);
107 107
                 $this->canvas = new OutlineMapCanvas(
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
                     trim($xml->canvas->defaultcolor), 
115 115
                     trim($xml->canvas->defaultstroke)
116 116
                 );
117
-                foreach($xml->subdivisions->children() as $subdivision){
117
+                foreach ($xml->subdivisions->children() as $subdivision) {
118 118
                     $attributes = $subdivision->attributes();
119 119
                     $key = trim($attributes['name']);
120
-                    if(isset($attributes['parent'])) $key .= '@'.trim($attributes['parent']);
120
+                    if (isset($attributes['parent'])) $key .= '@'.trim($attributes['parent']);
121 121
                     $this->subdivisions[$key] = array(
122 122
                         'id' => trim($attributes['id']),
123 123
                         'displayname' => trim($attributes['name']),
124 124
                         'coord' => trim($subdivision[0])
125 125
                     );
126 126
                 }
127
-                if(isset($xml->mappings)) {
128
-                    foreach($xml->mappings->children() as $mappings){
127
+                if (isset($xml->mappings)) {
128
+                    foreach ($xml->mappings->children() as $mappings) {
129 129
                         $attributes = $mappings->attributes();
130 130
                         $this->mappings[trim($attributes['name'])] = trim($attributes['mapto']);
131 131
                     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * @return string
143 143
 	 */
144 144
     public function getFileName() {
145
-        if(!$this->is_loaded) $this->load();
145
+        if (!$this->is_loaded) $this->load();
146 146
         return $this->filename;
147 147
     }
148 148
     
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @return string
152 152
 	 */
153 153
     public function getDescription() {
154
-        if(!$this->is_loaded) $this->load();
154
+        if (!$this->is_loaded) $this->load();
155 155
         return $this->description;
156 156
     }
157 157
     
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 * @return string
161 161
 	 */
162 162
     public function getTopLevelName() {
163
-        if(!$this->is_loaded) $this->load();
163
+        if (!$this->is_loaded) $this->load();
164 164
         return $this->top_level_name;
165 165
     }    
166 166
     
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @return \MyArtJaub\Webtrees\Module\GeoDispersion\Model\OutlineMapCanvas
170 170
      */
171 171
     public function getCanvas() {
172
-        if(!$this->is_loaded) $this->load();
172
+        if (!$this->is_loaded) $this->load();
173 173
         return $this->canvas;
174 174
     }
175 175
     
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      * @return array
179 179
      */
180 180
     public function getSubdivisions() {
181
-        if(!$this->is_loaded) $this->load();
181
+        if (!$this->is_loaded) $this->load();
182 182
         return $this->subdivisions;
183 183
     }
184 184
     
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      * @return array
188 188
      */
189 189
     public function getPlacesMappings() {
190
-        if(!$this->is_loaded) $this->load();
190
+        if (!$this->is_loaded) $this->load();
191 191
         return $this->mappings;
192 192
     }
193 193
                    
Please login to merge, or discard this patch.