Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Util/TLogRouter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,15 +72,13 @@  discard block
 block discarded – undo
72 72
 				{
73 73
 					$phpConfig = include $this->_configFile;
74 74
 					$this->loadConfig($phpConfig);
75
-				}
76
-				else
75
+				} else
77 76
 				{
78 77
 					$dom = new TXmlDocument;
79 78
 					$dom->loadFromFile($this->_configFile);
80 79
 					$this->loadConfig($dom);
81 80
 				}
82
-			}
83
-			else
81
+			} else
84 82
 				throw new TConfigurationException('logrouter_configfile_invalid', $this->_configFile);
85 83
 		}
86 84
 		$this->loadConfig($config);
@@ -112,8 +110,7 @@  discard block
 block discarded – undo
112 110
 					$route->init($route);
113 111
 				}
114 112
 			}
115
-		}
116
-		else
113
+		} else
117 114
 		{
118 115
 			foreach($config->getElementsByTagName('route') as $routeConfig)
119 116
 			{
Please login to merge, or discard this patch.
framework/Util/TDataFieldAccessor.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 				foreach (explode(".", $field) as $f)
67 67
 					$tmp = $tmp[$f];
68 68
 				return $tmp;
69
-			}
70
-			elseif(is_object($data))
69
+			} elseif(is_object($data))
71 70
 			{
72 71
 				if(strpos($field, '.') === false)  // simple field
73 72
 				{
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
 						return call_user_func([$data,'get' . $field]);
76 75
 					else
77 76
 						return $data->{$field};
78
-				}
79
-				else // field in the format of xxx.yyy.zzz
77
+				} else // field in the format of xxx.yyy.zzz
80 78
 				{
81 79
 					$object = $data;
82 80
 					foreach(explode('.', $field) as $f)
@@ -84,8 +82,7 @@  discard block
 block discarded – undo
84 82
 					return $object;
85 83
 				}
86 84
 			}
87
-		}
88
-		catch(Exception $e)
85
+		} catch(Exception $e)
89 86
 		{
90 87
 			throw new TInvalidDataValueException('datafieldaccessor_datafield_invalid', $field, $e->getMessage());
91 88
 		}
Please login to merge, or discard this patch.
framework/Util/TSimpleDateFormatter.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@  discard block
 block discarded – undo
233 233
 			$year = "{$date['year']}";
234 234
 			$month = $date['mon'];
235 235
 			$day = $date['mday'];
236
-		}
237
-		else
236
+		} else
238 237
 		{
239 238
 			$year = null;
240 239
 			$month = null;
@@ -270,8 +269,7 @@  discard block
 block discarded – undo
270 269
 						$year = $iYear + 2000;
271 270
 				}
272 271
 				$year = (int)$year;
273
-			}
274
-			elseif($token == 'MM' || $token == 'M')
272
+			} elseif($token == 'MM' || $token == 'M')
275 273
 			{
276 274
 				$month = $this->getInteger($value,$i_val,
277 275
 									$this->length($token), 2);
@@ -281,8 +279,7 @@  discard block
 block discarded – undo
281 279
 					//throw new TInvalidDataValueException('Invalid month', $value);
282 280
 				$i_val += strlen($month);
283 281
 				$month = $iMonth;
284
-			}
285
-			elseif ($token == 'dd' || $token == 'd')
282
+			} elseif ($token == 'dd' || $token == 'd')
286 283
 			{
287 284
 				$day = $this->getInteger($value,$i_val,
288 285
 									$this->length($token), 2);
@@ -292,8 +289,7 @@  discard block
 block discarded – undo
292 289
 					//throw new TInvalidDataValueException('Invalid day', $value);
293 290
 				$i_val += strlen($day);
294 291
 				$day = $iDay;
295
-			}
296
-			else
292
+			} else
297 293
 			{
298 294
 				if($this->substring($value, $i_val, $this->length($token)) != $token)
299 295
 					return null;
Please login to merge, or discard this patch.
framework/Util/TFirePhpLogRoute.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
 			{
69 69
 				$delta = $logs[$i + 1][3] - $logs[$i][3];
70 70
 				$total = $logs[$i + 1][3] - $first;
71
-			}
72
-			else
71
+			} else
73 72
 			{
74 73
 				$delta = '?';
75 74
 				$total = $logs[$i][3] - $first;
Please login to merge, or discard this patch.
framework/Util/TVarDumper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
 		{
53 53
 			$result = highlight_string("<?php\n" . self::$_output, true);
54 54
 			return preg_replace('/&lt;\\?php<br \\/>/', '', $result, 1);
55
-		}
56
-		else
55
+		} else
57 56
 			return self::$_output;
58 57
 	}
59 58
 
Please login to merge, or discard this patch.
framework/Util/TParameterModule.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -78,14 +78,12 @@  discard block
 block discarded – undo
78 78
 					$configFile->loadFromFile($this->_paramFile);
79 79
 					$cache->set($cacheKey, $configFile, 0, new TFileCacheDependency($this->_paramFile));
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				if($this->getApplication()->getConfigurationType() == TApplication::CONFIG_TYPE_PHP)
85 84
 				{
86 85
 					$configFile = include $this->_paramFile;
87
-				}
88
-				else
86
+				} else
89 87
 				{
90 88
 					$configFile = new TXmlDocument;
91 89
 					$configFile->loadFromFile($this->_paramFile);
@@ -112,14 +110,12 @@  discard block
 block discarded – undo
112 110
 				{
113 111
 					$properties = isset($parameter['properties'])?$parameter['properties']:[];
114 112
 					$parameters[$id] = [$parameter['class'],$properties];
115
-				}
116
-				else
113
+				} else
117 114
 				{
118 115
 					$parameters[$id] = $parameter;
119 116
 				}
120 117
 			}
121
-		}
122
-		elseif($config instanceof TXmlElement)
118
+		} elseif($config instanceof TXmlElement)
123 119
 		{
124 120
 			foreach($config->getElementsByTagName('parameter') as $node)
125 121
 			{
@@ -132,8 +128,7 @@  discard block
 block discarded – undo
132 128
 						$parameters[$id] = $node;
133 129
 					else
134 130
 						$parameters[$id] = $value;
135
-				}
136
-				else
131
+				} else
137 132
 					$parameters[$id] = [$type,$properties->toArray()];
138 133
 			}
139 134
 		}
@@ -147,8 +142,7 @@  discard block
 block discarded – undo
147 142
 				foreach($parameter[1] as $name => $value)
148 143
 					$component->setSubProperty($name, $value);
149 144
 				$appParams->add($id, $component);
150
-			}
151
-			else
145
+			} else
152 146
 				$appParams->add($id, $parameter);
153 147
 		}
154 148
 	}
Please login to merge, or discard this patch.
framework/Data/Common/TDbCommandBuilder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -468,8 +468,7 @@
 block discarded – undo
468 468
 			$values = array_values($values);
469 469
 			for($i = 0, $max = count($values); $i < $max; $i++)
470 470
 				$command->bindValue($i + 1, $values[$i], $this->getPdoType($values[$i]));
471
-		}
472
-		else
471
+		} else
473 472
 		{
474 473
 			foreach($values as $name => $value)
475 474
 			{
Please login to merge, or discard this patch.
framework/Data/Common/Mysql/TMysqlMetaData.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 					$info['NumericPrecision'] = intval($pscale[1]);
161 161
 					if(count($pscale) > 2)
162 162
 						$info['NumericScale'] = intval($pscale[2]);
163
-				}
164
-				else
163
+				} else
165 164
 					$info['ColumnSize'] = intval($pscale[1]);
166 165
 			}
167 166
 		}
@@ -260,8 +259,7 @@  discard block
 block discarded – undo
260 259
 		try
261 260
 		{
262 261
 			return count($result = $command->queryRow()) > 0 && $result['Table_type'] === 'VIEW';
263
-		}
264
-		catch(TDbException $e)
262
+		} catch(TDbException $e)
265 263
 		{
266 264
 			$table = $schemaName === null?$tableName:$schemaName . '.' . $tableName;
267 265
 			throw new TDbException('dbcommon_invalid_table_name', $table, $e->getMessage());
Please login to merge, or discard this patch.
framework/Data/Common/Oracle/TOracleMetaData.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,11 +207,9 @@  discard block
 block discarded – undo
207 207
 				$info['NumericPrecision'] = intval($matches[1]);
208 208
 				if(count($matches) > 2)
209 209
 					$info['NumericScale'] = intval($matches[2]);
210
-			}
211
-			else
210
+			} else
212 211
 				$info['ColumnSize'] = intval($matches[1]);
213
-		}
214
-		else
212
+		} else
215 213
 			$info['DbType'] = $col['type'];
216 214
 		$tableInfo->Columns[$columnId] = new TOracleTableColumn($info);
217 215
 	}
@@ -353,8 +351,7 @@  discard block
 block discarded – undo
353 351
 SELECT table_name, '{$schema}' as table_schema FROM user_tables
354 352
 EOD;
355 353
 			$command = $this->getDbConnection()->createCommand($sql);
356
-		}
357
-		else
354
+		} else
358 355
 		{
359 356
 			$sql = <<<EOD
360 357
 SELECT object_name as table_name, owner as table_schema FROM all_objects
Please login to merge, or discard this patch.