Passed
Push — master ( 1f995c...3a0433 )
by Jonathan
05:20
created
src/Webtrees/Module/Certificates/Views/CertificatesListView.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@  discard block
 block discarded – undo
39 39
     			<input type="hidden" name="ged" value="<?= $this->data->get('url_ged') ?>">
40 40
     			<select name="city">
41 41
     			<?php foreach ($cities as $city) { ?>
42
-    				<option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?= $city ?></option>
42
+    				<option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) {
43
+	echo 'selected="selected"'?> ><?= $city ?></option>
43 44
     			<?php } ?>
44 45
     			</select>
45 46
     			<input type="submit" value="<?= I18N::translate('Show') ?>" />
@@ -72,9 +73,12 @@  discard block
 block discarded – undo
72 73
     						<!--  Certificate Name -->
73 74
     						<?php 
74 75
     						$name = $certificate->getCertificateDetails() ?: '';
76
+}
75 77
     						$sortname = "";
76 78
     						$ct_names=preg_match("/([A-Z]{2,})/", $name, $match);
77
-    						if($ct_names > 0) $sortname = $match[1].'_';
79
+    						if($ct_names > 0) {
80
+    							$sortname = $match[1].'_';
81
+    						}
78 82
     						$sortname .= $name;
79 83
     						?>
80 84
     						<td data-sort="<?= Filter::escapeHtml($sortname) ?>">
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlockModule.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,9 +89,10 @@
 block discarded – undo
89 89
         $wb_controller = new WelcomeBlockController($this);
90 90
         try {
91 91
             return $wb_controller->config($block_id);
92
-        }
93
-        catch (MvcException $ex) {
94
-            if($ex->getHttpCode() != 200) throw $ex;
92
+        } catch (MvcException $ex) {
93
+            if($ex->getHttpCode() != 200) {
94
+            	throw $ex;
95
+            }
95 96
             return;
96 97
         }     
97 98
     }
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/WelcomeBlockController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,9 @@
 block discarded – undo
98 98
      */
99 99
     public function config($block_id = null) {
100 100
         
101
-        if(empty($block_id)) throw new MvcException(404);
101
+        if(empty($block_id)) {
102
+        	throw new MvcException(404);
103
+        }
102 104
 
103 105
         if (Filter::postBool('save') && Filter::checkCsrf()) {
104 106
             $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListFamView.php 1 patch
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -293,10 +293,8 @@  discard block
 block discarded – undo
293 293
 						<?= I18N::number($family->getNumberOfChildren()) ?>
294 294
 					</td>
295 295
 					<td hidden><?php 
296
-					if (!$mdate->isOK()) { echo 'U'; }
297
-					else {
298
-					    if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; }
299
-					    else { echo 'YES'; }
296
+					if (!$mdate->isOK()) { echo 'U'; } else {
297
+					    if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } else { echo 'YES'; }
300 298
 					}
301 299
 					if ($family->getFacts(WT_EVENTS_DIV)) { echo 'D'; }
302 300
 					if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) {
@@ -316,9 +314,7 @@  discard block
 block discarded – undo
316 314
         			if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?>
317 315
         			</td>
318 316
         			<td hidden><?php 
319
-			         if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; }
320
-			         elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; }
321
-			         else { echo '&nbsp;'; } ?>
317
+			         if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } else { echo '&nbsp;'; } ?>
322 318
 			         </td>
323 319
 				</tr>
324 320
         	<?php } ?>
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListMissingView.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,10 @@
 block discarded – undo
184 184
 							<td class="ui-state-default" colspan="11">
185 185
 								<div class="center">
186 186
 									<?= I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))) ?>
187
-									<?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?>
187
+									<?php if($this->data->get('missing_hidden') > 0) {
188
+	echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']';
189
+}
190
+?>
188 191
 									<?= ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)) ?>
189 192
 									<?= ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']' ?>
190 193
 								</div>
Please login to merge, or discard this patch.
src/Webtrees/Module/AdminTasks/TaskController.php 1 patch
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -94,14 +94,15 @@  discard block
 block discarded – undo
94 94
             $this->provider->setTaskStatus($task, $status);
95 95
             $res['status'] = $status;
96 96
 			Log::addConfigurationLog('Module '.$this->module->getName().' : Admin Task "'.$task->getName().'" has been '. ($status ? 'enabled' : 'disabled') .'.');
97
-        }
98
-        catch (\Exception $ex) {
97
+        } catch (\Exception $ex) {
99 98
             $res['error'] = $ex->getMessage();
100 99
 			Log::addErrorLog('Module '.$this->module->getName().' : Admin Task "'.$task->getName().'" could not be ' . ($status ? 'enabled' : 'disabled') .'. Error: '. $ex->getMessage());
101 100
         }
102 101
         
103 102
         $controller->pageHeader();
104
-        if($res['error']) http_response_code(500);
103
+        if($res['error']) {
104
+        	http_response_code(500);
105
+        }
105 106
         
106 107
         $controller->encode($res);
107 108
     }
@@ -169,8 +170,7 @@  discard block
 block discarded – undo
169 170
 			$task->setFrequency($frequency);
170 171
 			if($is_limited == 1) {
171 172
 				$task->setRemainingOccurrences($nb_occur);
172
-			}
173
-			else {
173
+			} else {
174 174
 				$task->setRemainingOccurrences(0);
175 175
 			}
176 176
 			
@@ -191,8 +191,7 @@  discard block
 block discarded – undo
191 191
 					Log::addConfigurationLog('Module '.$this->module->getName().' : AdminTask “'.$task->getName() .'” has been updated.');
192 192
 					$success = true;
193 193
 				}
194
-			}
195
-			else {
194
+			} else {
196 195
 				FlashMessages::addMessage(I18N::translate('An error occured while updating the administrative task “%s”', $task->getTitle()), 'danger');
197 196
 				Log::addConfigurationLog('Module '.$this->module->getName().' : AdminTask “'. $task->getName() .'” could not be updated. See error log.');
198 197
 			}
Please login to merge, or discard this patch.
src/Webtrees/Module/AdminTasks/Model/AbstractTask.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,7 +235,9 @@  discard block
 block discarded – undo
235 235
 	 * @return bool
236 236
 	 */
237 237
 	public function save() {
238
-	    if(!$this->provider) throw new \Exception('The task has not been initialised with a provider.');
238
+	    if(!$this->provider) {
239
+	    	throw new \Exception('The task has not been initialised with a provider.');
240
+	    }
239 241
 		return $this->provider->updateTask($this);
240 242
 	}
241 243
 	
@@ -245,8 +247,9 @@  discard block
 block discarded – undo
245 247
      */
246 248
     public function execute(){
247 249
     
248
-        if($this->last_updated->add(new \DateInterval('PT'.self::TASK_TIME_OUT.'S')) < new \DateTime())
249
-            $this->is_running = false;
250
+        if($this->last_updated->add(new \DateInterval('PT'.self::TASK_TIME_OUT.'S')) < new \DateTime()) {
251
+                    $this->is_running = false;
252
+        }
250 253
     
251 254
         if(!$this->is_running){
252 255
             $this->last_result = false;
@@ -259,7 +262,9 @@  discard block
 block discarded – undo
259 262
                 $this->last_updated = new \DateTime();
260 263
                 if($this->nb_occurrences > 0){
261 264
                     $this->nb_occurrences--;
262
-                    if($this->nb_occurrences == 0) $this->is_enabled = false;
265
+                    if($this->nb_occurrences == 0) {
266
+                    	$this->is_enabled = false;
267
+                    }
263 268
                 }
264 269
             }
265 270
             $this->is_running = false;
Please login to merge, or discard this patch.
src/Webtrees/Map/GoogleMapsProvider.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,16 @@
 block discarded – undo
31 31
 			$nb_levels = count($parent);
32 32
 			for ($i=0; $i < $nb_levels; $i++) {
33 33
 				$parent[$i] = trim($parent[$i]);
34
-				if (empty($parent[$i])) $parent[$i]='unknown';// GoogleMap module uses "unknown" while GEDCOM uses , ,
34
+				if (empty($parent[$i])) {
35
+					$parent[$i]='unknown';
36
+				}
37
+				// GoogleMap module uses "unknown" while GEDCOM uses , ,
35 38
 				$pl_id=Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place')
36 39
 					->execute(array($i, $place_id, $parent[$i]))
37 40
 					->fetchOne();
38
-				if (empty($pl_id)) break;
41
+				if (empty($pl_id)) {
42
+					break;
43
+				}
39 44
 				$place_id = $pl_id;
40 45
 			}
41 46
 			return $place_id;
Please login to merge, or discard this patch.
src/Webtrees/Module/IsSourcedModule.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,8 +65,9 @@  discard block
 block discarded – undo
65 65
 	public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) {
66 66
 	    if($ctrlIndi){
67 67
 	        $dindi = new Individual($ctrlIndi->getSignificantIndividual());
68
-	        if ($dindi->canDisplayIsSourced()) 
69
-	            return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large');
68
+	        if ($dindi->canDisplayIsSourced()) {
69
+	        	            return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large');
70
+	        }
70 71
 	    }
71 72
 	    return '';
72 73
 	}
@@ -99,8 +100,9 @@  discard block
 block discarded – undo
99 100
 	        $dindi = new Individual($grec);
100 101
 	        $html .= FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, $size);
101 102
 	        $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isBirthSourced(), 'BIRT', 1, $size);
102
-	        if($grec->isDead())
103
-	            $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1, $size);
103
+	        if($grec->isDead()) {
104
+	        	            $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1, $size);
105
+	        }
104 106
 	    }
105 107
 	    return $html;
106 108
 	}
@@ -173,12 +175,13 @@  discard block
 block discarded – undo
173 175
 	                   </tr>';
174 176
 	            }
175 177
 	            
176
-	            if( $root->isDead() )
177
-	                echo '
178
+	            if( $root->isDead() ) {
179
+	            	                echo '
178 180
 	                    <tr>
179 181
 	                       <td class="slabel">' . GedcomTag::getLabel('DEAT') . '</td>
180 182
 	                       <td class="svalue">' . FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1).'</td>
181 183
 	                   </tr>';
184
+	            }
182 185
 	            
183 186
 	            echo '</table>';
184 187
 	        }
Please login to merge, or discard this patch.