Passed
Branch feature/2.1-geodispersion-dev (1d61a8)
by Jonathan
61:21
created
src/Webtrees/Module/Hooks/Views/AdminConfigView.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,10 @@
 block discarded – undo
66 66
 								<td><?php echo (($hook->status)=='enabled'); ?></td>
67 67
 								<td><?php echo $hook->hook; ?></td>
68 68
 								<td><?php echo $hook->context; ?></td>
69
-								<td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
69
+								<td><?php if($mod = Module::getModuleByName($hook->module)) {
70
+	echo $mod->getTitle();
71
+}
72
+?></td>
70 73
 								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
71 74
 								<td><?php echo $hook->priority; ?></td>
72 75
 							</tr>
Please login to merge, or discard this patch.
src/Webtrees/Module/ModuleManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,13 +72,11 @@
 block discarded – undo
72 72
     					// as they could change by the next call to the method
73 73
     					return false;
74 74
     				}
75
-    			}
76
-    			else {
75
+    			} else {
77 76
     				$this->modules_list[$moduleName] = TRUE;
78 77
     				return true;
79 78
     			}
80
-    		}
81
-    		else {
79
+    		} else {
82 80
     			$this->modules_list[$moduleName] = FALSE;
83 81
     		}
84 82
     	}
Please login to merge, or discard this patch.
src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisEditView.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,10 @@
 block discarded – undo
54 54
     				<?php echo I18N::translate('Description'); ?>
55 55
     			</label>
56 56
     			<div class="col-sm-9">
57
-    				<input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if(!$is_new) echo 'value="' . Filter::escapeHtml($ga->getTitle()) .'"'; ?> dir="auto">
57
+    				<input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if(!$is_new) {
58
+	echo 'value="' . Filter::escapeHtml($ga->getTitle()) .'"';
59
+}
60
+?> dir="auto">
58 61
     				<p class="small text-muted">
59 62
     					<?php echo I18N::translate('Description to be given to the geographical dispersion analysis. It will be used as the page title for it.'); ?>
60 63
     				</p>
Please login to merge, or discard this patch.
src/Webtrees/Place.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
77 77
 			$index = str_replace('%', '', $match2);
78 78
 			if(is_numeric($index) && $index >0 && $index <= $nbLevels){
79 79
 				$displayPlace = str_replace($match2, $levels[$index-1] , $displayPlace);
80
-			}
81
-			else{
80
+			} else{
82 81
 				$displayPlace = str_replace($match2, '' , $displayPlace);
83 82
 			}
84 83
 		}
Please login to merge, or discard this patch.
src/Webtrees/Mvc/View/ViewFactory.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,13 +53,21 @@
 block discarded – undo
53 53
      */
54 54
     public function makeView($view_name, MvcController $mvc_ctrl, BaseController $ctrl, ViewBag $data) 
55 55
     {
56
-        if(!$mvc_ctrl) throw new \Exception('Mvc Controller not defined');
57
-        if(!$ctrl) throw new \Exception('Base Controller not defined');
58
-        if(!$view_name) throw new \Exception('View not defined');
56
+        if(!$mvc_ctrl) {
57
+        	throw new \Exception('Mvc Controller not defined');
58
+        }
59
+        if(!$ctrl) {
60
+        	throw new \Exception('Base Controller not defined');
61
+        }
62
+        if(!$view_name) {
63
+        	throw new \Exception('View not defined');
64
+        }
59 65
         
60 66
         $mvc_ctrl_refl = new \ReflectionObject($mvc_ctrl);
61 67
         $view_class = $mvc_ctrl_refl->getNamespaceName() . '\\Views\\' . $view_name . 'View';       
62
-        if(!class_exists($view_class)) throw new \Exception('View does not exist');
68
+        if(!class_exists($view_class)) {
69
+        	throw new \Exception('View does not exist');
70
+        }
63 71
         
64 72
         return new $view_class($ctrl, $data);
65 73
     }
Please login to merge, or discard this patch.
src/Webtrees/Mvc/View/ViewBag.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,12 @@
 block discarded – undo
73 73
      * @param bool $override
74 74
      */
75 75
     public function set($key, $value, $override = true) {
76
-        if(is_null($key)) return;
77
-        if(!$override && array_key_exists($key, $this->data)) return;
76
+        if(is_null($key)) {
77
+        	return;
78
+        }
79
+        if(!$override && array_key_exists($key, $this->data)) {
80
+        	return;
81
+        }
78 82
         $this->data[$key] = $value;        
79 83
     }
80 84
     
Please login to merge, or discard this patch.
src/Webtrees/Mvc/Dispatcher.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,19 +71,16 @@
 block discarded – undo
71 71
 			if(method_exists($ctrl, $method)) {
72 72
 			    try {
73 73
 			        call_user_func_array(array($ctrl, $method), array());
74
-			    }
75
-			    catch (MvcException $ex) {
74
+			    } catch (MvcException $ex) {
76 75
 			        if(!headers_sent()) {
77 76
 			            http_response_code($ex->getHttpCode());
78 77
 			        }
79 78
 			        echo $ex->getMessage();			        
80 79
 			    }
81
-			}
82
-			 else {
80
+			} else {
83 81
 				 throw new \Exception('The page requested does not exist');
84 82
 			 }
85
-		 }
86
-		 else {
83
+		 } else {
87 84
 			 throw new \Exception('The page requested does not exist');
88 85
 		 }
89 86
     }
Please login to merge, or discard this patch.
src/Webtrees/Mvc/MvcException.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,9 @@
 block discarded – undo
58 58
      * @throws InvalidArgumentException Thrown if not valid Http code
59 59
      */
60 60
     public function setHttpCode($http_code) {
61
-        if(!in_array($http_code, self::$VALID_HTTP))
62
-            throw new \InvalidArgumentException('Invalid HTTP code');
61
+        if(!in_array($http_code, self::$VALID_HTTP)) {
62
+                    throw new \InvalidArgumentException('Invalid HTTP code');
63
+        }
63 64
         $this->http_code= $http_code;
64 65
     }   
65 66
 
Please login to merge, or discard this patch.
src/Webtrees/Module/HooksModule.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
         try {
69 69
             Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);
70 70
             return true;
71
-        }
72
-        catch (\Exception $ex) { }
71
+        } catch (\Exception $ex) { }
73 72
         return false;
74 73
     }
75 74
     
Please login to merge, or discard this patch.