Completed
Push — remove_deprecates ( 1de955...c03db3 )
by Fabio
16:32 queued 07:25
created
framework/Web/UI/WebControls/TBaseValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -518,16 +518,14 @@
 block discarded – undo
518 518
 				{
519 519
 					$this->setIsValid(true);
520 520
 					$this->onValidationSuccess();
521
-				}
522
-				else
521
+				} else
523 522
 				{
524 523
 					if($target)
525 524
 						$target->setIsValid(false);
526 525
 					$this->setIsValid(false);
527 526
 					$this->onValidationError();
528 527
 				}
529
-			}
530
-			else
528
+			} else
531 529
 			{
532 530
 				$this->evaluateIsValid();
533 531
 				$this->setIsValid(true);
Please login to merge, or discard this patch.
framework/Web/UI/TTemplateControl.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@  discard block
 block discarded – undo
69 69
 			if(!isset(self::$_template[$class]))
70 70
 				self::$_template[$class]=$this->loadTemplate();
71 71
 			return self::$_template[$class];
72
-		}
73
-		else
72
+		} else
74 73
 			return $this->_localTemplate;
75 74
 	}
76 75
 
@@ -205,8 +204,7 @@  discard block
 block discarded – undo
205 204
 			$controls=$placeholder->getParent()->getControls();
206 205
 			$loc=$controls->remove($placeholder);
207 206
 			$controls->insertAt($loc,$content);
208
-		}
209
-		else
207
+		} else
210 208
 			throw new TConfigurationException('templatecontrol_placeholder_inexistent',$id);
211 209
 	}
212 210
 
@@ -232,8 +230,7 @@  discard block
 block discarded – undo
232 230
 			$master->ensureChildControls();
233 231
 			foreach($this->_contents as $id=>$content)
234 232
 				$master->injectContent($id,$content);
235
-		}
236
-		else if(!empty($this->_contents))
233
+		} else if(!empty($this->_contents))
237 234
 			throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
238 235
 		parent::initRecursive($namingContainer);
239 236
 	}
@@ -261,8 +258,7 @@  discard block
 block discarded – undo
261 258
                                                 $control->Checked = (boolean) $arObj->{$key};
262 259
                                         elseif ($control instanceof TDatePicker)
263 260
                                                 $control->Date = $arObj->{$key};
264
-                                }
265
-                                else
261
+                                } else
266 262
                                 {
267 263
                                         foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
268 264
                                         {
@@ -284,8 +280,7 @@  discard block
 block discarded – undo
284 280
                                         }
285 281
                                         break;
286 282
                                 }
287
-                        } 
288
-                        catch (Exception $ex)
283
+                        } catch (Exception $ex)
289 284
                         {
290 285
                                 if ($throwExceptions)
291 286
                                         throw $ex;
@@ -315,8 +310,7 @@  discard block
 block discarded – undo
315 310
                                         $arObj->{$key} = $control->Checked;
316 311
                                 elseif ($control instanceof TDatePicker)
317 312
                                         $arObj->{$key} = $control->Date;
318
-                        } 
319
-                        catch (Exception $ex)
313
+                        } catch (Exception $ex)
320 314
                         {
321 315
                                 if ($throwExceptions)
322 316
                                         throw $ex;
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
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 				foreach (explode(".", $field) as $f)
62 62
 				    $tmp = $tmp[$f];
63 63
 				return $tmp;
64
-			}
65
-			else if(is_object($data))
64
+			} else if(is_object($data))
66 65
 			{
67 66
 				if(strpos($field,'.')===false)  // simple field
68 67
 				{
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
 						return call_user_func(array($data,'get'.$field));
71 70
 					else
72 71
 						return $data->{$field};
73
-				}
74
-				else // field in the format of xxx.yyy.zzz
72
+				} else // field in the format of xxx.yyy.zzz
75 73
 				{
76 74
 					$object=$data;
77 75
 					foreach(explode('.',$field) as $f)
@@ -79,8 +77,7 @@  discard block
 block discarded – undo
79 77
 					return $object;
80 78
 				}
81 79
 			}
82
-		}
83
-		catch(Exception $e)
80
+		} catch(Exception $e)
84 81
 		{
85 82
 			throw new TInvalidDataValueException('datafieldaccessor_datafield_invalid',$field,$e->getMessage());
86 83
 		}
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
@@ -71,14 +71,12 @@  discard block
 block discarded – undo
71 71
 					$configFile->loadFromFile($this->_paramFile);
72 72
 					$cache->set($cacheKey,$configFile,0,new TFileCacheDependency($this->_paramFile));
73 73
 				}
74
-			}
75
-			else
74
+			} else
76 75
 			{
77 76
 				if($this->getApplication()->getConfigurationType()==TApplication::CONFIG_TYPE_PHP)
78 77
 				{
79 78
 					$configFile = include $this->_paramFile;
80
-				}
81
-				else
79
+				} else
82 80
 				{
83 81
 					$configFile=new TXmlDocument;
84 82
 					$configFile->loadFromFile($this->_paramFile);
@@ -105,14 +103,12 @@  discard block
 block discarded – undo
105 103
 				{
106 104
 					$properties = isset($parameter['properties'])?$parameter['properties']:array();
107 105
 					$parameters[$id]=array($parameter['class'],$properties);
108
-				}
109
-				else
106
+				} else
110 107
 				{
111 108
 					$parameters[$id] = $parameter;
112 109
 				}
113 110
 			}
114
-		}
115
-		else if($config instanceof TXmlElement)
111
+		} else if($config instanceof TXmlElement)
116 112
 		{
117 113
 			foreach($config->getElementsByTagName('parameter') as $node)
118 114
 			{
@@ -125,8 +121,7 @@  discard block
 block discarded – undo
125 121
 						$parameters[$id]=$node;
126 122
 					else
127 123
 						$parameters[$id]=$value;
128
-				}
129
-				else
124
+				} else
130 125
 					$parameters[$id]=array($type,$properties->toArray());
131 126
 			}
132 127
 		}
@@ -140,8 +135,7 @@  discard block
 block discarded – undo
140 135
 				foreach($parameter[1] as $name=>$value)
141 136
 					$component->setSubProperty($name,$value);
142 137
 				$appParams->add($id,$component);
143
-			}
144
-			else
138
+			} else
145 139
 				$appParams->add($id,$parameter);
146 140
 		}
147 141
 	}
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
@@ -155,8 +155,9 @@  discard block
 block discarded – undo
155 155
                 $this->_temp_tarname = '';
156 156
                 return false;
157 157
               }
158
-              while ($v_data = @fread($v_file_from, 1024))
159
-                  @fwrite($v_file_to, $v_data);
158
+              while ($v_data = @fread($v_file_from, 1024)) {
159
+                                @fwrite($v_file_to, $v_data);
160
+              }
160 161
               @fclose($v_file_from);
161 162
               @fclose($v_file_to);
162 163
           }
@@ -410,8 +411,9 @@  discard block
 block discarded – undo
410 411
           $v_header['filename'] = substr($v_header['filename'],
411 412
 		                                 $p_remove_path_size);
412 413
         if (($p_path != './') && ($p_path != '/')) {
413
-          while (substr($p_path, -1) == '/')
414
-            $p_path = substr($p_path, 0, strlen($p_path)-1);
414
+          while (substr($p_path, -1) == '/') {
415
+                      $p_path = substr($p_path, 0, strlen($p_path)-1);
416
+          }
415 417
 
416 418
           if (substr($v_header['filename'], 0, 1) == '/')
417 419
               $v_header['filename'] = $p_path.$v_header['filename'];
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
@@ -203,11 +203,9 @@  discard block
 block discarded – undo
203 203
 				$info['NumericPrecision'] = intval($matches[1]);
204 204
 				if(count($matches) > 2)
205 205
 					$info['NumericScale'] = intval($matches[2]);
206
-			}
207
-			else
206
+			} else
208 207
 				$info['ColumnSize'] = intval($matches[1]);
209
-		}
210
-		else
208
+		} else
211 209
 			$info['DbType'] = $col['type'];
212 210
 		$tableInfo->Columns[$columnId] = new TOracleTableColumn($info);
213 211
 	}
@@ -349,8 +347,7 @@  discard block
 block discarded – undo
349 347
 SELECT table_name, '{$schema}' as table_schema FROM user_tables
350 348
 EOD;
351 349
 			$command=$this->getDbConnection()->createCommand($sql);
352
-		}
353
-		else
350
+		} else
354 351
 		{
355 352
 			$sql=<<<EOD
356 353
 SELECT object_name as table_name, owner as table_schema FROM all_objects
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
@@ -154,8 +154,7 @@  discard block
 block discarded – undo
154 154
 					$info['NumericPrecision'] = intval($pscale[1]);
155 155
 					if(count($pscale) > 2)
156 156
 						$info['NumericScale'] = intval($pscale[2]);
157
-				}
158
-				else
157
+				} else
159 158
 					$info['ColumnSize'] = intval($pscale[1]);
160 159
 			}
161 160
 		}
@@ -254,8 +253,7 @@  discard block
 block discarded – undo
254 253
 		try
255 254
 		{
256 255
 			return count($result = $command->queryRow()) > 0 && $result['Table_type']==='VIEW';
257
-		}
258
-		catch(TDbException $e)
256
+		} catch(TDbException $e)
259 257
 		{
260 258
 			$table = $schemaName===null?$tableName:$schemaName.'.'.$tableName;
261 259
 			throw new TDbException('dbcommon_invalid_table_name',$table,$e->getMessage());
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/TActiveRecord.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -425,14 +425,12 @@  discard block
 block discarded – undo
425 425
 				$this->_recordState = self::STATE_LOADED;
426 426
 				return true;
427 427
 			}
428
-		}
429
-		else if($this->_recordState===self::STATE_LOADED)
428
+		} else if($this->_recordState===self::STATE_LOADED)
430 429
 		{
431 430
 			$this->onUpdate($param);
432 431
 			if($param->getIsValid() && $gateway->update($this))
433 432
 				return true;
434
-		}
435
-		else
433
+		} else
436 434
 			throw new TActiveRecordException('ar_save_invalid', get_class($this));
437 435
 
438 436
 		return false;
@@ -455,8 +453,7 @@  discard block
 block discarded – undo
455 453
 				$this->_recordState=self::STATE_DELETED;
456 454
 				return true;
457 455
 			}
458
-		}
459
-		else
456
+		} else
460 457
 			throw new TActiveRecordException('ar_delete_invalid', get_class($this));
461 458
 
462 459
 		return false;
@@ -723,8 +720,7 @@  discard block
 block discarded – undo
723 720
 		{
724 721
 			$criteria = $this->getRecordCriteria(count($args)>0 ? $args[0] : null, array_slice($args,1));
725 722
 			return $context->getRelationHandler($criteria);
726
-		}
727
-		else
723
+		} else
728 724
 			return null;
729 725
 	}
730 726
 
@@ -743,8 +739,7 @@  discard block
 block discarded – undo
743 739
 		{
744 740
 			list($property, $relation) = $definition;
745 741
 			return new TActiveRecordRelationContext($this,$property,$relation);
746
-		}
747
-		else
742
+		} else
748 743
 			return null;
749 744
 	}
750 745
 
@@ -827,8 +822,7 @@  discard block
 block discarded – undo
827 822
 		{
828 823
 			$property= $method[4]==='_' ? substr($method,5) : substr($method,4);
829 824
 			return $this->getRelationHandler($property, $args);
830
-		}
831
-		else if($findOne=strncasecmp($method,'findby',6)===0)
825
+		} else if($findOne=strncasecmp($method,'findby',6)===0)
832 826
 			$condition = $method[6]==='_' ? substr($method,7) : substr($method,6);
833 827
 		else if(strncasecmp($method,'findallby',9)===0)
834 828
 			$condition = $method[9]==='_' ? substr($method,10) : substr($method,9);
@@ -894,8 +888,7 @@  discard block
 block discarded – undo
894 888
 		{
895 889
 			$useArgs = !is_array($parameters) && is_array($args);
896 890
 			return new TActiveRecordCriteria($criteria,$useArgs ? $args : $parameters);
897
-		}
898
-		else if($criteria instanceof TSqlCriteria)
891
+		} else if($criteria instanceof TSqlCriteria)
899 892
 			return $criteria;
900 893
 		else
901 894
 			return new TActiveRecordCriteria();
Please login to merge, or discard this patch.
framework/Data/TDbCommand.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -109,8 +109,7 @@  discard block
 block discarded – undo
109 109
 			try
110 110
 			{
111 111
 				$this->_statement=$this->getConnection()->getPdoInstance()->prepare($this->getText());
112
-			}
113
-			catch(Exception $e)
112
+			} catch(Exception $e)
114 113
 			{
115 114
 				throw new TDbException('dbcommand_prepare_failed',$e->getMessage(),$this->getText());
116 115
 			}
@@ -186,11 +185,9 @@  discard block
 block discarded – undo
186 185
 			{
187 186
 				$this->_statement->execute();
188 187
 				return $this->_statement->rowCount();
189
-			}
190
-			else
188
+			} else
191 189
 				return $this->getConnection()->getPdoInstance()->exec($this->getText());
192
-		}
193
-		catch(Exception $e)
190
+		} catch(Exception $e)
194 191
 		{
195 192
 			throw new TDbException('dbcommand_execute_failed',$e->getMessage(),$this->getDebugStatementText());
196 193
 		}
@@ -223,8 +220,7 @@  discard block
 block discarded – undo
223 220
 			else
224 221
 				$this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
225 222
 			return new TDbDataReader($this);
226
-		}
227
-		catch(Exception $e)
223
+		} catch(Exception $e)
228 224
 		{
229 225
 			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
230 226
 		}
@@ -250,8 +246,7 @@  discard block
 block discarded – undo
250 246
 			$result=$this->_statement->fetch($fetchAssociative ? PDO::FETCH_ASSOC : PDO::FETCH_NUM);
251 247
 			$this->_statement->closeCursor();
252 248
 			return $result;
253
-		}
254
-		catch(Exception $e)
249
+		} catch(Exception $e)
255 250
 		{
256 251
 			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
257 252
 		}
@@ -279,8 +274,7 @@  discard block
 block discarded – undo
279 274
 				return stream_get_contents($result);
280 275
 			else
281 276
 				return $result;
282
-		}
283
-		catch(Exception $e)
277
+		} catch(Exception $e)
284 278
 		{
285 279
 			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
286 280
 		}
Please login to merge, or discard this patch.