Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Web/TUrlMapping.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -137,15 +137,13 @@  discard block
 block discarded – undo
137 137
 			{
138 138
 				$config = include $this->_configFile;
139 139
 				$this->loadUrlMappings($dom);
140
-			}
141
-			else
140
+			} else
142 141
 			{
143 142
 				$dom = new TXmlDocument;
144 143
 				$dom->loadFromFile($this->_configFile);
145 144
 				$this->loadUrlMappings($dom);
146 145
 			}
147
-		}
148
-		else
146
+		} else
149 147
 			throw new TConfigurationException('urlmapping_configfile_inexistent', $this->_configFile);
150 148
 	}
151 149
 
@@ -252,8 +250,7 @@  discard block
 block discarded – undo
252 250
 					$this->buildUrlMapping($class, $properties, $url);
253 251
 				}
254 252
 			}
255
-		}
256
-		else
253
+		} else
257 254
 		{
258 255
 			foreach($config->getElementsByTagName('url') as $url)
259 256
 			{
@@ -367,8 +364,7 @@  discard block
 block discarded – undo
367 364
 					if($rule->supportCustomUrl($getItems))
368 365
 						return $rule->constructUrl($getItems, $encodeAmpersand, $encodeGetItems);
369 366
 				}
370
-			}
371
-			elseif(isset($this->_constructRules[$wildCardKey]))
367
+			} elseif(isset($this->_constructRules[$wildCardKey]))
372 368
 			{
373 369
 				foreach($this->_constructRules[$wildCardKey] as $rule)
374 370
 				{
Please login to merge, or discard this patch.
framework/Xml/TXmlElementList.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
 			if($item->getParent() !== null)
64 64
 				$item->getParent()->getElements()->remove($item);
65 65
 			$item->setParent($this->_o);
66
-		}
67
-		else
66
+		} else
68 67
 			throw new TInvalidDataTypeException('xmlelementlist_xmlelement_required');
69 68
 	}
70 69
 
Please login to merge, or discard this patch.
framework/Xml/TXmlElement.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -217,13 +217,11 @@
 block discarded – undo
217 217
 				$str .= $element->toString($indent + 1) . "\n";
218 218
 			$str .= $prefix . "</{$this->_tagName}>";
219 219
 			return $str;
220
-		}
221
-		elseif(($value = $this->getValue()) !== '')
220
+		} elseif(($value = $this->getValue()) !== '')
222 221
 		{
223 222
 			$value = $this->xmlEncode($value);
224 223
 			return $prefix . "<{$this->_tagName}$attr>$value</{$this->_tagName}>";
225
-		}
226
-		else
224
+		} else
227 225
 			return $prefix . "<{$this->_tagName}$attr />";
228 226
 	}
229 227
 
Please login to merge, or discard this patch.
framework/I18N/core/DateFormat.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,12 +136,10 @@  discard block
 block discarded – undo
136 136
 			{
137 137
 				$sub = preg_replace('/(^\')|(\'$)/', '', $pattern);
138 138
 				$tokens[$i] = str_replace('``````', '\'', $sub);
139
-			}
140
-			elseif($pattern == '``````')
139
+			} elseif($pattern == '``````')
141 140
 			{
142 141
 				$tokens[$i] = '\'';
143
-			}
144
-			else
142
+			} else
145 143
 			{
146 144
 				$function = $this->getFunctionName($pattern);
147 145
 				if($function != null)
@@ -151,8 +149,7 @@  discard block
 block discarded – undo
151 149
 					{
152 150
 						$rs = $this->$fName($date, $pattern);
153 151
 						$tokens[$i] = $rs;
154
-					}
155
-					else
152
+					} else
156 153
 						throw new
157 154
 						Exception('function ' . $function . ' not found.');
158 155
 				}
@@ -287,8 +284,7 @@  discard block
 block discarded – undo
287 284
 			if($char == null || $pattern{$i} == $char || $text)
288 285
 			{
289 286
 				$token .= $pattern{$i};
290
-			}
291
-			else
287
+			} else
292 288
 			{
293 289
 				$tokens[] = str_replace("", "'", $token);
294 290
 				$token = $pattern{$i};
Please login to merge, or discard this patch.
framework/I18N/core/NumberFormat.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -203,16 +203,14 @@  discard block
 block discarded – undo
203 203
 						$integer = $groupSeparator . $integer;
204 204
 						$count++;
205 205
 					}
206
-				}
207
-				elseif($multiGroup && $count >= 1)
206
+				} elseif($multiGroup && $count >= 1)
208 207
 				{
209 208
 					if($i != 0 && ($i - $groupSize[0]) % $groupSize[1] == 0)
210 209
 					{
211 210
 						$integer = $groupSeparator . $integer;
212 211
 						$count++;
213 212
 					}
214
-				}
215
-				else
213
+				} else
216 214
 				{
217 215
 					if($i != 0 && $i % $groupSize[0] == 0)
218 216
 					{
@@ -223,8 +221,7 @@  discard block
 block discarded – undo
223 221
 
224 222
 				$integer = $char . $integer;
225 223
 			}
226
-		}
227
-		else
224
+		} else
228 225
 			$integer = $string;
229 226
 
230 227
 		return $integer;
@@ -250,27 +247,23 @@  discard block
 block discarded – undo
250 247
 			if($decimalDigits == -1)
251 248
 			{
252 249
 				$decimal = substr($string, $dp + 1);
253
-			}
254
-			elseif(is_int($decimalDigits))
250
+			} elseif(is_int($decimalDigits))
255 251
 			{
256 252
 				$float = round((float)$string, $decimalDigits);
257 253
 				if(strpos((string)$float, '.') === false)
258 254
 				{
259 255
 					$decimal = str_pad($decimal, $decimalDigits, '0');
260
-				}
261
-				else
256
+				} else
262 257
 				{
263 258
 					$decimal = substr($float, strpos($float, '.') + 1);
264 259
 					if(strlen($decimal) < $decimalDigits)
265 260
 						$decimal = str_pad($decimal, $decimalDigits, '0');
266 261
 				}
267
-			}
268
-			else
262
+			} else
269 263
 				return $decimal;
270 264
 
271 265
 			return $decimalSeparator . $decimal;
272
-		}
273
-		elseif ($decimalDigits > 0)
266
+		} elseif ($decimalDigits > 0)
274 267
 			return $decimalSeparator . str_pad($decimal, $decimalDigits, '0');
275 268
 
276 269
 		return $decimal;
Please login to merge, or discard this patch.
framework/I18N/core/NumberFormatInfo.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,15 +186,13 @@  discard block
 block discarded – undo
186 186
 			$formatInfo = $culture->NumberFormat;
187 187
 			$formatInfo->setPattern($type);
188 188
 			return $formatInfo;
189
-		}
190
-		   elseif(is_string($culture))
189
+		} elseif(is_string($culture))
191 190
 		   {
192 191
 			   $cultureInfo = new CultureInfo($culture);
193 192
 			   $formatInfo = $cultureInfo->NumberFormat;
194 193
 			   $formatInfo->setPattern($type);
195 194
 			   return $formatInfo;
196
-		   }
197
-		   else
195
+		   } else
198 196
 		   {
199 197
 			$cultureInfo = new CultureInfo();
200 198
 			   $formatInfo = $cultureInfo->NumberFormat;
@@ -294,8 +292,7 @@  discard block
 block discarded – undo
294 292
 			{
295 293
 				$groupSize1 = $decimalPos - $groupPos1 - 1;
296 294
 
297
-			}
298
-			else
295
+			} else
299 296
 			{
300 297
 				//no decimal point, so traverse from the back
301 298
 				//to find the groupsize 1.
Please login to merge, or discard this patch.
framework/I18N/core/HTTPNegotiator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,7 @@
 block discarded – undo
80 80
 					// i-prefix, such as i-cherokee
81 81
 					if(count($codes) > 1)
82 82
 						$lang = $codes[1];
83
-				}
84
-				else
83
+				} else
85 84
 				{
86 85
 					for($i = 0, $k = count($codes); $i < $k; ++$i)
87 86
 					{
Please login to merge, or discard this patch.
framework/IO/TTarFileExtractor.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,8 +157,9 @@  discard block
 block discarded – undo
157 157
 				$this->_temp_tarname = '';
158 158
 				return false;
159 159
 			  }
160
-			  while ($v_data = @fread($v_file_from, 1024))
161
-				  @fwrite($v_file_to, $v_data);
160
+			  while ($v_data = @fread($v_file_from, 1024)) {
161
+			  				  @fwrite($v_file_to, $v_data);
162
+			  }
162 163
 			  @fclose($v_file_from);
163 164
 			  @fclose($v_file_to);
164 165
 		  }
@@ -412,8 +413,9 @@  discard block
 block discarded – undo
412 413
 		  $v_header['filename'] = substr($v_header['filename'],
413 414
 										 $p_remove_path_size);
414 415
 		if (($p_path != './') && ($p_path != '/')) {
415
-		  while (substr($p_path, -1) == '/')
416
-			$p_path = substr($p_path, 0, strlen($p_path) - 1);
416
+		  while (substr($p_path, -1) == '/') {
417
+		  			$p_path = substr($p_path, 0, strlen($p_path) - 1);
418
+		  }
417 419
 
418 420
 		  if (substr($v_header['filename'], 0, 1) == '/')
419 421
 			  $v_header['filename'] = $p_path . $v_header['filename'];
Please login to merge, or discard this patch.
framework/Util/TDbLogRoute.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,8 +87,7 @@  discard block
 block discarded – undo
87 87
 		try
88 88
 		{
89 89
 			$db->createCommand($sql)->query()->close();
90
-		}
91
-		catch(Exception $e)
90
+		} catch(Exception $e)
92 91
 		{
93 92
 			// DB table not exists
94 93
 			if($this->_autoCreate)
@@ -154,8 +153,7 @@  discard block
 block discarded – undo
154 153
 				return $config->getDbConnection();
155 154
 			else
156 155
 				throw new TConfigurationException('dblogroute_connectionid_invalid', $this->_connID);
157
-		}
158
-		else
156
+		} else
159 157
 		{
160 158
 			$db = new TDbConnection;
161 159
 			// default to SQLite3 database
Please login to merge, or discard this patch.