Completed
Push — namespace2 ( fc6e2b...8a6673 )
by Fabio
08:49
created
framework/Data/SqlMap/Statements/TCachingStatement.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 	public function __construct(TMappedStatement $statement)
24 24
 	{
25
-		$this->_mappedStatement = $statement;
25
+		$this->_mappedStatement=$statement;
26 26
 	}
27 27
 
28 28
 	public function getID()
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
 		return $this->_mappedStatement->getManager();
41 41
 	}
42 42
 
43
-	public function executeQueryForMap($connection, $parameter,$keyProperty, $valueProperty=null,  $skip=-1, $max=-1,$delegate=null)
43
+	public function executeQueryForMap($connection, $parameter, $keyProperty, $valueProperty=null, $skip=-1, $max=-1, $delegate=null)
44 44
 	{
45
-		$sql = $this->createCommand($connection, $parameter, $skip, $max);
46
-		$key = $this->getCacheKey(array(clone($sql), $keyProperty, $valueProperty,$skip, $max));
47
-		$map = $this->getStatement()->getCache()->get($key);
45
+		$sql=$this->createCommand($connection, $parameter, $skip, $max);
46
+		$key=$this->getCacheKey(array(clone($sql), $keyProperty, $valueProperty, $skip, $max));
47
+		$map=$this->getStatement()->getCache()->get($key);
48 48
 		if($map===null)
49 49
 		{
50
-			$map = $this->_mappedStatement->runQueryForMap(
51
-				$connection, $parameter, $sql, $keyProperty, $valueProperty,  $delegate);
50
+			$map=$this->_mappedStatement->runQueryForMap(
51
+				$connection, $parameter, $sql, $keyProperty, $valueProperty, $delegate);
52 52
 			$this->getStatement()->getCache()->set($key, $map);
53 53
 		}
54 54
 		return $map;
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 
67 67
 	public function executeQueryForList($connection, $parameter, $result=null, $skip=-1, $max=-1, $delegate=null)
68 68
 	{
69
-		$sql = $this->createCommand($connection, $parameter, $skip, $max);
70
-		$key = $this->getCacheKey(array(clone($sql), $parameter, $skip, $max));
71
-		$list = $this->getStatement()->getCache()->get($key);
69
+		$sql=$this->createCommand($connection, $parameter, $skip, $max);
70
+		$key=$this->getCacheKey(array(clone($sql), $parameter, $skip, $max));
71
+		$list=$this->getStatement()->getCache()->get($key);
72 72
 		if($list===null)
73 73
 		{
74
-			$list = $this->_mappedStatement->runQueryForList(
74
+			$list=$this->_mappedStatement->runQueryForList(
75 75
 				$connection, $parameter, $sql, $result, $delegate);
76 76
 			$this->getStatement()->getCache()->set($key, $list);
77 77
 		}
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 
81 81
 	public function executeQueryForObject($connection, $parameter, $result=null)
82 82
 	{
83
-		$sql = $this->createCommand($connection, $parameter);
84
-		$key = $this->getCacheKey(array(clone($sql), $parameter));
85
-		$object = $this->getStatement()->getCache()->get($key);
83
+		$sql=$this->createCommand($connection, $parameter);
84
+		$key=$this->getCacheKey(array(clone($sql), $parameter));
85
+		$object=$this->getStatement()->getCache()->get($key);
86 86
 		if($object===null)
87 87
 		{
88
-			$object = $this->_mappedStatement->runQueryForObject($connection, $sql, $result);
88
+			$object=$this->_mappedStatement->runQueryForObject($connection, $sql, $result);
89 89
 			$this->getStatement()->getCache()->set($key, $object);
90 90
 		}
91 91
 		return $object;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 	protected function getCacheKey($object)
95 95
 	{
96
-		$cacheKey = new TSqlMapCacheKey($object);
96
+		$cacheKey=new TSqlMapCacheKey($object);
97 97
 		return $cacheKey->getHash();
98 98
 	}
99 99
 
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TPreparedStatementFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,18 +20,18 @@
 block discarded – undo
20 20
 {
21 21
 	private $_statement;
22 22
 	private $_preparedStatement;
23
-	private $_parameterPrefix = 'param';
23
+	private $_parameterPrefix='param';
24 24
 	private $_commandText;
25 25
 
26 26
 	public function __construct($statement, $sqlString)
27 27
 	{
28
-		$this->_statement = $statement;
29
-		$this->_commandText = $sqlString;
28
+		$this->_statement=$statement;
29
+		$this->_commandText=$sqlString;
30 30
 	}
31 31
 
32 32
 	public function prepare()
33 33
 	{
34
-		$this->_preparedStatement = new TPreparedStatement();
34
+		$this->_preparedStatement=new TPreparedStatement();
35 35
 		$this->_preparedStatement->setPreparedSql($this->_commandText);
36 36
 		if($this->_statement->parameterMap()!==null)
37 37
 			$this->createParametersForTextCommand();
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TPreparedStatement.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,33 +22,33 @@
 block discarded – undo
22 22
 	private $_parameterNames;
23 23
 	private $_parameterValues;
24 24
 
25
-	public function getPreparedSql(){ return $this->_sqlString; }
26
-	public function setPreparedSql($value){ $this->_sqlString = $value; }
25
+	public function getPreparedSql() { return $this->_sqlString; }
26
+	public function setPreparedSql($value) { $this->_sqlString=$value; }
27 27
 
28
-	public function getParameterNames($needed = true)
28
+	public function getParameterNames($needed=true)
29 29
 	{
30
-		if (!$this->_parameterNames and $needed)
31
-			$this->_parameterNames = new TList;
30
+		if(!$this->_parameterNames and $needed)
31
+			$this->_parameterNames=new TList;
32 32
 		return $this->_parameterNames;
33 33
 	}
34 34
 
35
-	public function setParameterNames($value){ $this->_parameterNames = $value; }
35
+	public function setParameterNames($value) { $this->_parameterNames=$value; }
36 36
 
37
-	public function getParameterValues($needed = true)
37
+	public function getParameterValues($needed=true)
38 38
 	{
39
-		if (!$this->_parameterValues and $needed)
39
+		if(!$this->_parameterValues and $needed)
40 40
 			$this->_parameterValues=new TMap;
41 41
 		return $this->_parameterValues;
42 42
 	}
43 43
 
44
-	public function setParameterValues($value){ $this->_parameterValues = $value; }
44
+	public function setParameterValues($value) { $this->_parameterValues=$value; }
45 45
 
46 46
 	public function __sleep()
47 47
 	{
48
-		$exprops = array(); $cn = __CLASS__;
49
-		if (!$this->_parameterNames or !$this->_parameterNames->getCount()) $exprops[] = "\0$cn\0_parameterNames";
50
-		if (!$this->_parameterValues or !$this->_parameterValues->getCount()) $exprops[] = "\0$cn\0_parameterValues";
51
-		return array_diff(parent::__sleep(),$exprops);
48
+		$exprops=array(); $cn=__CLASS__;
49
+		if(!$this->_parameterNames or !$this->_parameterNames->getCount()) $exprops[]="\0$cn\0_parameterNames";
50
+		if(!$this->_parameterValues or !$this->_parameterValues->getCount()) $exprops[]="\0$cn\0_parameterValues";
51
+		return array_diff(parent::__sleep(), $exprops);
52 52
 	}
53 53
 }
54 54
 
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TPreparedCommand.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -21,45 +21,45 @@
 block discarded – undo
21 21
  */
22 22
 class TPreparedCommand
23 23
 {
24
-	public function create(TSqlMapManager $manager, $connection, $statement, $parameterObject,$skip=null,$max=null)
24
+	public function create(TSqlMapManager $manager, $connection, $statement, $parameterObject, $skip=null, $max=null)
25 25
 	{
26
-		$sqlText = $statement->getSQLText();
26
+		$sqlText=$statement->getSQLText();
27 27
 
28
-		$prepared = $sqlText->getPreparedStatement($parameterObject);
28
+		$prepared=$sqlText->getPreparedStatement($parameterObject);
29 29
 		$connection->setActive(true);
30
-		$sql = $prepared->getPreparedSql();
30
+		$sql=$prepared->getPreparedSql();
31 31
 
32 32
 		if($sqlText instanceof TSimpleDynamicSql)
33
-			$sql = $sqlText->replaceDynamicParameter($sql, $parameterObject);
33
+			$sql=$sqlText->replaceDynamicParameter($sql, $parameterObject);
34 34
 
35 35
 		if($max!==null || $skip!==null)
36 36
 		{
37
-			$builder = TDbMetaData::getInstance($connection)->createCommandBuilder();
38
-			$sql = $builder->applyLimitOffset($sql,$max,$skip);
37
+			$builder=TDbMetaData::getInstance($connection)->createCommandBuilder();
38
+			$sql=$builder->applyLimitOffset($sql, $max, $skip);
39 39
 		}
40
-		$command = $connection->createCommand($sql);
40
+		$command=$connection->createCommand($sql);
41 41
 		$this->applyParameterMap($manager, $command, $prepared, $statement, $parameterObject);
42 42
 
43 43
 		return $command;
44 44
 	}
45 45
 
46
-	protected function applyParameterMap($manager,$command,$prepared, $statement, $parameterObject)
46
+	protected function applyParameterMap($manager, $command, $prepared, $statement, $parameterObject)
47 47
 	{
48
-		$properties = $prepared->getParameterNames(false);
48
+		$properties=$prepared->getParameterNames(false);
49 49
 		//$parameters = $prepared->getParameterValues();
50 50
 		$registry=$manager->getTypeHandlers();
51
-		if ($properties)
52
-		for($i = 0, $k=$properties->getCount(); $i<$k; $i++)
51
+		if($properties)
52
+		for($i=0, $k=$properties->getCount(); $i < $k; $i++)
53 53
 		{
54
-			$property = $statement->parameterMap()->getProperty($i);
55
-			$value = $statement->parameterMap()->getPropertyValue($registry,$property, $parameterObject);
56
-			$dbType = $property->getDbType();
54
+			$property=$statement->parameterMap()->getProperty($i);
55
+			$value=$statement->parameterMap()->getPropertyValue($registry, $property, $parameterObject);
56
+			$dbType=$property->getDbType();
57 57
 			if($dbType=='') //relies on PHP lax comparison
58
-				$command->bindValue($i+1,$value, TDbCommandBuilder::getPdoType($value));
58
+				$command->bindValue($i + 1, $value, TDbCommandBuilder::getPdoType($value));
59 59
 			else if(strpos($dbType, 'PDO::')===0)
60
-				$command->bindValue($i+1,$value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT
60
+				$command->bindValue($i + 1, $value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT
61 61
 			else
62
-				$command->bindValue($i+1,$value);
62
+				$command->bindValue($i + 1, $value);
63 63
 		}
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TStaticSql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
 
23 23
 	public function buildPreparedStatement($statement, $sqlString)
24 24
 	{
25
-		$factory = new TPreparedStatementFactory($statement, $sqlString);
26
-		$this->_preparedStatement = $factory->prepare();
25
+		$factory=new TPreparedStatementFactory($statement, $sqlString);
26
+		$this->_preparedStatement=$factory->prepare();
27 27
 	}
28 28
 
29 29
 	public function getPreparedStatement($parameter=null)
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed delegate for each data row retrieved.
42 42
 	 * @param int number of page to fetch on initialization
43 43
 	 */
44
-	public function __construct(IMappedStatement $statement,$parameter, $pageSize, $delegate=null, $page=0)
44
+	public function __construct(IMappedStatement $statement, $parameter, $pageSize, $delegate=null, $page=0)
45 45
 	{
46 46
 		parent::__construct();
47 47
 		parent::setCustomPaging(true);
48
-		$this->initialize($statement,$parameter, $pageSize, $page);
48
+		$this->initialize($statement, $parameter, $pageSize, $page);
49 49
 		$this->_delegate=$delegate;
50 50
 	}
51 51
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	protected function initialize($statement, $parameter, $pageSize, $page)
60 60
 	{
61
-		$this->_statement = $statement;
62
-		$this->_parameter = $parameter;
61
+		$this->_statement=$statement;
62
+		$this->_parameter=$parameter;
63 63
 		$this->setPageSize($pageSize);
64 64
 		$this->attachEventHandler('OnFetchData', array($this, 'fetchDataFromStatement'));
65 65
 		$this->gotoPage($page);
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	protected function fetchDataFromStatement($sender, $param)
82 82
 	{
83
-		$limit = $this->getOffsetAndLimit($param);
84
-		$connection = $this->_statement->getManager()->getDbConnection();
85
-		$data = $this->_statement->executeQueryForList($connection,
83
+		$limit=$this->getOffsetAndLimit($param);
84
+		$connection=$this->_statement->getManager()->getDbConnection();
85
+		$data=$this->_statement->executeQueryForList($connection,
86 86
 						$this->_parameter, null, $limit[0], $limit[1], $this->_delegate);
87 87
 		$this->populateData($param, $data);
88 88
 	}
@@ -112,49 +112,49 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	protected function populateData($param, $data)
114 114
 	{
115
-		$total = $data instanceof TList ? $data->getCount() : count($data);
116
-		$pageSize = $this->getPageSize();
115
+		$total=$data instanceof TList ? $data->getCount() : count($data);
116
+		$pageSize=$this->getPageSize();
117 117
 		if($total < 1)
118 118
 		{
119 119
 			$param->setData($data);
120
-			$this->_prevPageList = null;
121
-			$this->_nextPageList = null;
120
+			$this->_prevPageList=null;
121
+			$this->_nextPageList=null;
122 122
 			return;
123 123
 		}
124 124
 
125 125
 		if($param->getNewPageIndex() < 1)
126 126
 		{
127
-			$this->_prevPageList = null;
127
+			$this->_prevPageList=null;
128 128
 			if($total <= $pageSize)
129 129
 			{
130 130
 				$param->setData($data);
131
-				$this->_nextPageList = null;
131
+				$this->_nextPageList=null;
132 132
 			}
133 133
 			else
134 134
 			{
135 135
 				$param->setData(array_slice($data, 0, $pageSize));
136
-				$this->_nextPageList = array_slice($data, $pageSize-1,$total);
136
+				$this->_nextPageList=array_slice($data, $pageSize - 1, $total);
137 137
 			}
138 138
 		}
139 139
 		else
140 140
 		{
141 141
 			if($total <= $pageSize)
142 142
 			{
143
-				$this->_prevPageList = array_slice($data, 0, $total);
143
+				$this->_prevPageList=array_slice($data, 0, $total);
144 144
 				$param->setData(array());
145
-				$this->_nextPageList = null;
145
+				$this->_nextPageList=null;
146 146
 			}
147
-			else if($total <= $pageSize*2)
147
+			else if($total <= $pageSize * 2)
148 148
 			{
149
-				$this->_prevPageList = array_slice($data, 0, $pageSize);
149
+				$this->_prevPageList=array_slice($data, 0, $pageSize);
150 150
 				$param->setData(array_slice($data, $pageSize, $total));
151
-				$this->_nextPageList = null;
151
+				$this->_nextPageList=null;
152 152
 			}
153 153
 			else
154 154
 			{
155
-				$this->_prevPageList = array_slice($data, 0, $pageSize);
155
+				$this->_prevPageList=array_slice($data, 0, $pageSize);
156 156
 				$param->setData(array_slice($data, $pageSize, $pageSize));
157
-				$this->_nextPageList = array_slice($data, $pageSize*2, $total-$pageSize*2);
157
+				$this->_nextPageList=array_slice($data, $pageSize * 2, $total - $pageSize * 2);
158 158
 			}
159 159
 		}
160 160
 	}
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 	 */
167 167
 	protected function getOffsetAndLimit($param)
168 168
 	{
169
-		$index = $param->getNewPageIndex();
170
-		$pageSize = $this->getPageSize();
171
-		return $index < 1 ? array($index, $pageSize*2) : array(($index-1)*$pageSize, $pageSize*3);
169
+		$index=$param->getNewPageIndex();
170
+		$pageSize=$this->getPageSize();
171
+		return $index < 1 ? array($index, $pageSize * 2) : array(($index - 1) * $pageSize, $pageSize * 3);
172 172
 	}
173 173
 
174 174
 	/**
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public function registerTypeHandler(TSqlMapTypeHandler $handler)
49 49
 	{
50
-		$this->_typeHandlers[$handler->getType()] = $handler;
50
+		$this->_typeHandlers[$handler->getType()]=$handler;
51 51
 	}
52 52
 
53 53
 	/**
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 		switch(strtolower($type))
91 91
 		{
92 92
 			case 'integer': case 'int':
93
-				$type = 'integer'; break;
93
+				$type='integer'; break;
94 94
 			case 'float': case 'double': case 'decimal':
95
-				$type = 'float'; break;
95
+				$type='float'; break;
96 96
 			case 'boolean': case 'bool':
97
-				$type = 'boolean'; break;
97
+				$type='boolean'; break;
98 98
 			case 'string' :
99
-				$type = 'string'; break;
99
+				$type='string'; break;
100 100
 			default:
101 101
 				return $value;
102 102
 		}
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TPropertyAccess.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -48,34 +48,34 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed property value.
49 49
 	 * @throws TInvalidDataValueException if property path is invalid.
50 50
 	 */
51
-	public static function get($object,$path)
51
+	public static function get($object, $path)
52 52
 	{
53 53
 		if(!is_array($object) && !is_object($object))
54 54
 			return $object;
55
-		$properties = explode('.', $path);
55
+		$properties=explode('.', $path);
56 56
 		foreach($properties as $prop)
57 57
 		{
58 58
 			if(is_array($object) || $object instanceof ArrayAccess)
59 59
 			{
60 60
 				if(array_key_exists($prop, $object))
61
-					$object = $object[$prop];
61
+					$object=$object[$prop];
62 62
 				else
63
-					throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
63
+					throw new TInvalidPropertyException('sqlmap_invalid_property', $path);
64 64
 			}
65 65
 			else if(is_object($object))
66 66
 			{
67
-				$getter = 'get'.$prop;
67
+				$getter='get'.$prop;
68 68
 				if(method_exists($object, $getter) && is_callable(array($object, $getter)))
69
-					$object = $object->{$getter}();
69
+					$object=$object->{$getter}();
70 70
 				else if(in_array($prop, array_keys(get_object_vars($object))))
71
-					$object = $object->{$prop};
71
+					$object=$object->{$prop};
72 72
 				elseif(method_exists($object, '__get') && is_callable(array($object, '__get')))
73
-					$object = $object->{$prop};
73
+					$object=$object->{$prop};
74 74
 				else
75
-					throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
75
+					throw new TInvalidPropertyException('sqlmap_invalid_property', $path);
76 76
 			}
77 77
 			else
78
-				throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
78
+				throw new TInvalidPropertyException('sqlmap_invalid_property', $path);
79 79
 		}
80 80
 		return $object;
81 81
 	}
@@ -89,25 +89,25 @@  discard block
 block discarded – undo
89 89
 	{
90 90
 		if(!is_array($object) && !is_object($object))
91 91
 			return false;
92
-		$properties = explode('.', $path);
92
+		$properties=explode('.', $path);
93 93
 		foreach($properties as $prop)
94 94
 		{
95 95
 			if(is_array($object) || $object instanceof ArrayAccess)
96 96
 			{
97 97
 				if(array_key_exists($prop, $object))
98
-					$object = $object[$prop];
98
+					$object=$object[$prop];
99 99
 				else
100 100
 					return false;
101 101
 			}
102 102
 			else if(is_object($object))
103 103
 			{
104
-				$getter = 'get'.$prop;
104
+				$getter='get'.$prop;
105 105
 				if(method_exists($object, $getter) && is_callable(array($object, $getter)))
106
-					$object = $object->{$getter}();
106
+					$object=$object->{$getter}();
107 107
 				else if(in_array($prop, array_keys(get_object_vars($object))))
108
-					$object = $object->{$prop};
108
+					$object=$object->{$prop};
109 109
 				elseif(method_exists($object, '__get') && is_callable(array($object, '__get')))
110
-					$object = $object->{$prop};
110
+					$object=$object->{$prop};
111 111
 				else
112 112
 					return false;
113 113
 			}
@@ -126,27 +126,27 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public static function set(&$originalObject, $path, $value)
128 128
 	{
129
-		$properties = explode('.', $path);
130
-		$prop = array_pop($properties);
129
+		$properties=explode('.', $path);
130
+		$prop=array_pop($properties);
131 131
 		if(count($properties) > 0)
132
-			$object = self::get($originalObject, implode('.',$properties));
132
+			$object=self::get($originalObject, implode('.', $properties));
133 133
 		else
134
-			$object = &$originalObject;
134
+			$object=&$originalObject;
135 135
 
136 136
 		if(is_array($object) || $object instanceof ArrayAccess)
137 137
 		{
138
-			$object[$prop] = $value;
138
+			$object[$prop]=$value;
139 139
 		}
140 140
 		else if(is_object($object))
141 141
 		{
142
-			$setter = 'set'.$prop;
143
-			if (method_exists($object, $setter) && is_callable(array($object, $setter)))
142
+			$setter='set'.$prop;
143
+			if(method_exists($object, $setter) && is_callable(array($object, $setter)))
144 144
 				$object->{$setter}($value);
145 145
 			else
146
-				$object->{$prop} = $value;
146
+				$object->{$prop}=$value;
147 147
 		}
148 148
 		else
149
-			throw new TInvalidPropertyException('sqlmap_invalid_property_type',$path);
149
+			throw new TInvalidPropertyException('sqlmap_invalid_property_type', $path);
150 150
 	}
151 151
 
152 152
 }
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TSqlMapException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
 		array_shift($args);
23 23
 		$n=count($args);
24 24
 		$tokens=array();
25
-		for($i=0;$i<$n;++$i)
25
+		for($i=0; $i < $n; ++$i)
26 26
 		{
27 27
 			if($args[$i] instanceof SimpleXmlElement)
28 28
 				$tokens['{'.$i.'}']=$this->implodeNode($args[$i]);
29 29
 			else
30 30
 				$tokens['{'.$i.'}']=TPropertyValue::ensureString($args[$i]);
31 31
 		}
32
-		parent::__construct(strtr($errorMessage,$tokens));
32
+		parent::__construct(strtr($errorMessage, $tokens));
33 33
 	}
34 34
 
35 35
 	/**
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	{
41 41
 		$attributes=array();
42 42
 		foreach($node->attributes() as $k=>$v)
43
-			$attributes[]=$k.'="'.(string)$v.'"';
44
-		return '<'.$node->getName().' '.implode(' ',$attributes).'>';
43
+			$attributes[]=$k.'="'.(string) $v.'"';
44
+		return '<'.$node->getName().' '.implode(' ', $attributes).'>';
45 45
 	}
46 46
 
47 47
 	/**
Please login to merge, or discard this patch.