Completed
Push — master ( 95506d...0f93c5 )
by Jonathan
07:55
created
src/Webtrees/ImageBuilder.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,9 @@  discard block
 block discarded – undo
87 87
 	 * @return ImageBuilder
88 88
 	 */
89 89
 	public function setExpireOffset($expireOffset) {
90
-	    if($expireOffset) $this->expire_offset = $expireOffset;
90
+	    if($expireOffset) {
91
+	    	$this->expire_offset = $expireOffset;
92
+	    }
91 93
 	    return $this;
92 94
 	}
93 95
 	
@@ -107,7 +109,9 @@  discard block
 block discarded – undo
107 109
 	 * @return ImageBuilder
108 110
 	 */
109 111
 	public function setShowWatermark($show_watermark) {
110
-	    if(!is_null($show_watermark)) $this->show_watermark = $show_watermark;
112
+	    if(!is_null($show_watermark)) {
113
+	    	$this->show_watermark = $show_watermark;
114
+	    }
111 115
 	    return $this;
112 116
 	}
113 117
 	
@@ -118,7 +122,9 @@  discard block
 block discarded – undo
118 122
 	 * @return ImageBuilder
119 123
 	 */
120 124
 	public function setFontMaxSize($font_max_size) {
121
-	    if($font_max_size) $this->font_max_size = $font_max_size;
125
+	    if($font_max_size) {
126
+	    	$this->font_max_size = $font_max_size;
127
+	    }
122 128
 	    return $this;
123 129
 	}
124 130
 	
@@ -129,7 +135,9 @@  discard block
 block discarded – undo
129 135
 	 * @return ImageBuilder
130 136
 	 */
131 137
 	public function setFontColor($font_color) {
132
-	    if($font_color) $this->font_color = $font_color;
138
+	    if($font_color) {
139
+	    	$this->font_color = $font_color;
140
+	    }
133 141
 	    return $this;
134 142
 	}
135 143
 	
@@ -280,8 +288,7 @@  discard block
 block discarded – undo
280 288
 	    // text to watermark with	    
281 289
 	    if(method_exists($this->media, 'getWatermarkText')) {
282 290
 	       $word1_text = $this->media->getWatermarkText();
283
-	    }
284
-	    else {
291
+	    } else {
285 292
 	        $word1_text = $this->media->getTitle();
286 293
 	    }
287 294
 	
Please login to merge, or discard this patch.
src/Webtrees/Hook/HookProvider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,16 +74,14 @@
 block discarded – undo
74 74
 								if(is_int($key)) {
75 75
 									$hook_item = $value;
76 76
 									$priority = self::DEFAULT_PRIORITY;
77
-								}
78
-								else{
77
+								} else{
79 78
 									$hook_item = explode('#', $key, 2);
80 79
 									$priority = $value;
81 80
 								}
82 81
 								if($hook_item && count($hook_item) == 2){
83 82
 									$hook_func = $hook_item[0];
84 83
 									$hook_cont = $hook_item[1];
85
-								}
86
-								else{
84
+								} else{
87 85
 									$hook_func = $hook_item[0];
88 86
 									$hook_cont = 'all';
89 87
 								}
Please login to merge, or discard this patch.
src/Webtrees/Individual.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 				$ct2 = preg_match_all($pattern, $titlefact->getValue(), $match2);
67 67
 				if($ct2>0){
68 68
 					$this->_titles[$match2[1][0]][]= trim($match2[2][0]);
69
-				}
70
-				else{
69
+				} else{
71 70
 					$this->_titles[$titlefact->getValue()][]='';
72 71
 				}
73 72
 			}
@@ -99,8 +98,7 @@  discard block
 block discarded – undo
99 98
 		if($bplace = $this->gedcomrecord->getBirthPlace()){
100 99
 			if($perc){
101 100
 				return array ($bplace, 1);
102
-			}
103
-			else{
101
+			} else{
104 102
 				return $bplace;
105 103
 			}
106 104
 		}
@@ -169,7 +167,9 @@  discard block
 block discarded – undo
169 167
 	 * @return int Level of sources
170 168
 	 * */
171 169
 	public function isBirthSourced(){
172
-		if($this->_isbirthsourced !== null) return $this->_isbirthsourced;
170
+		if($this->_isbirthsourced !== null) {
171
+			return $this->_isbirthsourced;
172
+		}
173 173
 		$this->_isbirthsourced = $this->isFactSourced(WT_EVENTS_BIRT);
174 174
 		return $this->_isbirthsourced;
175 175
 	}
@@ -180,7 +180,9 @@  discard block
 block discarded – undo
180 180
 	* @return int Level of sources
181 181
 	* */
182 182
 	public function isDeathSourced(){
183
-		if($this->_isdeathsourced !== null) return $this->_isdeathsourced;
183
+		if($this->_isdeathsourced !== null) {
184
+			return $this->_isdeathsourced;
185
+		}
184 186
 		$this->_isdeathsourced = $this->isFactSourced(WT_EVENTS_DEAT);
185 187
 		return $this->_isdeathsourced;
186 188
 	}
Please login to merge, or discard this patch.
src/Webtrees/Cache.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,9 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 */
82 82
 	protected function checkInit(){
83
-		if(!$this->is_init) $this->init();
83
+		if(!$this->is_init) {
84
+			$this->init();
85
+		}
84 86
 	}
85 87
 	
86 88
 	/**
@@ -93,7 +95,9 @@  discard block
 block discarded – undo
93 95
 	protected function getKeyName($value, AbstractModule $mod = null){
94 96
 	    $this->checkInit();
95 97
 		$mod_name = 'myartjaub';
96
-		if($mod !== null) $mod_name = $mod->getName();
98
+		if($mod !== null) {
99
+			$mod_name = $mod->getName();
100
+		}
97 101
 		return $mod_name.'_'.$value;
98 102
 	}
99 103
 
Please login to merge, or discard this patch.
src/Webtrees/Family.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
 	* @return int Level of sources
45 45
 	* */
46 46
 	function isMarriageSourced(){
47
-		if($this->_ismarriagesourced !== null) return $this->_ismarriagesourced;
47
+		if($this->_ismarriagesourced !== null) {
48
+			return $this->_ismarriagesourced;
49
+		}
48 50
 		$this->_ismarriagesourced = $this->isFactSourced(WT_EVENTS_MARR.'|MARC');
49 51
 		return $this->_ismarriagesourced;
50 52
 	}
Please login to merge, or discard this patch.
src/Webtrees/GedcomRecord.php 1 patch
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,9 +104,12 @@  discard block
 block discarded – undo
104 104
 	public function canDisplayIsSourced($access_level = null){
105 105
 		global $global_facts;
106 106
 
107
-		if(!$this->gedcomrecord->canShow($access_level)) return false;
108
-		if($access_level === null )
109
-		    $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree());
107
+		if(!$this->gedcomrecord->canShow($access_level)) {
108
+			return false;
109
+		}
110
+		if($access_level === null ) {
111
+				    $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree());
112
+		}
110 113
 
111 114
 		if (isset($global_facts['SOUR'])) {
112 115
 			return $global_facts['SOUR'] >= $access_level;
@@ -125,7 +128,9 @@  discard block
 block discarded – undo
125 128
 	 * @return int Level of sources
126 129
 	 */
127 130
 	public function isSourced(){
128
-		if($this->_issourced !== null) return $this->_issourced;
131
+		if($this->_issourced !== null) {
132
+			return $this->_issourced;
133
+		}
129 134
 		$this->_issourced=-1;
130 135
 		$sourcesfacts = $this->gedcomrecord->getFacts('SOUR');
131 136
 		foreach($sourcesfacts as $sourcefact){
@@ -144,7 +149,9 @@  discard block
 block discarded – undo
144 149
 	 * @return int Level of sources
145 150
 	 */
146 151
 	public function isFactSourced($eventslist){
147
-	    if(empty($eventslist)) return 0;
152
+	    if(empty($eventslist)) {
153
+	    	return 0;
154
+	    }
148 155
 		$isSourced=0;
149 156
 		$facts = $this->gedcomrecord->getFacts($eventslist);
150 157
 		foreach($facts as $fact){
@@ -154,8 +161,7 @@  discard block
 block discarded – undo
154 161
 				if($tmpIsSourced != 0) {
155 162
 					if($isSourced==0) {
156 163
 						$isSourced =  $tmpIsSourced;
157
-					}
158
-					else{
164
+					} else{
159 165
 						$isSourced = max($isSourced, $tmpIsSourced);
160 166
 					}
161 167
 				}
Please login to merge, or discard this patch.
src/Webtrees/Module/PatronymicLineage/Model/LineageRootNode.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/Module/PatronymicLineage/Model/LineageBuilder.php 1 patch
Braces   +24 added lines, -18 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
 	public function buildLineages() {				
55 55
 		$indis = \Fisharebest\Webtrees\Query\QueryName::individuals($this->tree, $this->surname, null, null, false, false);
56 56
 		
57
-		if(count($indis) == 0) return null;
57
+		if(count($indis) == 0) {
58
+			return null;
59
+		}
58 60
 		
59 61
 		$root_lineages = array();
60 62
 		
@@ -72,12 +74,13 @@  discard block
 block discarded – undo
72 74
 						if($indiChildFamily !== null){
73 75
 							$root_node = new LineageRootNode(null); 
74 76
 							$root_node->addFamily($indiChildFamily);
75
-						}
76
-						else{
77
+						} else{
77 78
 							$root_node = new LineageRootNode($indiFirst);
78 79
 						}
79 80
 						$root_node = $this->buildLineage($root_node);		
80
-						if($root_node) $root_lineages[] = $root_node;
81
+						if($root_node) {
82
+							$root_lineages[] = $root_node;
83
+						}
81 84
 					}
82 85
 				}
83 86
 			}
@@ -116,23 +119,19 @@  discard block
 block discarded – undo
116 119
 					//Check if the child is a natural child of the mother (based on the surname - Warning : surname must be identical)
117 120
 					if(!$dwife->isNewAddition() && I18N::strcasecmp($wife_surname, $indi_surname) == 0){
118 121
 						$resIndi=$wife;
119
-					}
120
-					else{
122
+					} else{
121 123
 						$is_first=true;
122 124
 					}
123
-				}
124
-				else{
125
+				} else{
125 126
 					$is_first=true;
126 127
 				}
127
-			}
128
-			else{
128
+			} else{
129 129
 				$is_first=true;
130 130
 			}
131 131
 		}
132 132
 		if(isset($this->used_indis[$resIndi->getXref()])){
133 133
 			return null;
134
-		}
135
-		else{
134
+		} else{
136 135
 			return $resIndi;
137 136
 		}
138 137
 	}
@@ -145,7 +144,9 @@  discard block
 block discarded – undo
145 144
 	 * @return LineageNode Computed lineage
146 145
 	 */
147 146
 	protected function buildLineage(LineageNode $node) {
148
-		if($node === null) return;
147
+		if($node === null) {
148
+			return;
149
+		}
149 150
 		
150 151
 		$indi_surname = null;
151 152
 		
@@ -198,7 +199,9 @@  discard block
 block discarded – undo
198 199
 								$nbNatural++;
199 200
 								$node_child = new LineageNode($child, $node->getRootNode());							
200 201
 								$node_child = $this->buildLineage($node_child);
201
-								if($node_child) $node->addChild($family, $node_child);
202
+								if($node_child) {
203
+									$node->addChild($family, $node_child);
204
+								}
202 205
 							}
203 206
 						}
204 207
 					}
@@ -212,12 +215,15 @@  discard block
 block discarded – undo
212 215
 							$nbNatural++;
213 216
 							$node_child = new LineageNode($child, $node->getRootNode());							
214 217
 							$node_child = $this->buildLineage($node_child);
215
-							if($node_child) $node->addChild($family, $node_child);
216
-						}
217
-						else {
218
+							if($node_child) {
219
+								$node->addChild($family, $node_child);
220
+							}
221
+						} else {
218 222
 							$nbNatural++;
219 223
 							$node_child = new LineageNode($child, $node->getRootNode(), $child_surname);
220
-							if($node_child) $node->addChild($family, $node_child);
224
+							if($node_child) {
225
+								$node->addChild($family, $node_child);
226
+							}
221 227
 						}
222 228
 					}
223 229
 				}
Please login to merge, or discard this patch.
src/Webtrees/Module/MiscExtensions/AdminConfigController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,9 @@
 block discarded – undo
88 88
         global $WT_TREE;
89 89
         
90 90
         $action = Filter::post('action');        
91
-        if($action == 'update' && Filter::checkCsrf()) $this->update();
91
+        if($action == 'update' && Filter::checkCsrf()) {
92
+        	$this->update();
93
+        }
92 94
         
93 95
         Theme::theme(new AdministrationTheme)->init($WT_TREE);        
94 96
         $ctrl = new PageController();
Please login to merge, or discard this patch.