Completed
Push — remove_deprecates ( 1de955...c03db3 )
by Fabio
16:32 queued 07:25
created
framework/Collections/TMap.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -163,11 +163,9 @@  discard block
 block discarded – undo
163 163
 				$value=$this->_d[$key];
164 164
 				unset($this->_d[$key]);
165 165
 				return $value;
166
-			}
167
-			else
166
+			} else
168 167
 				return null;
169
-		}
170
-		else
168
+		} else
171 169
 			throw new TInvalidOperationException('map_readonly',get_class($this));
172 170
 	}
173 171
 
@@ -211,8 +209,7 @@  discard block
 block discarded – undo
211 209
 				$this->clear();
212 210
 			foreach($data as $key=>$value)
213 211
 				$this->add($key,$value);
214
-		}
215
-		else if($data!==null)
212
+		} else if($data!==null)
216 213
 			throw new TInvalidDataTypeException('map_data_not_iterable');
217 214
 	}
218 215
 
@@ -228,8 +225,7 @@  discard block
 block discarded – undo
228 225
 		{
229 226
 			foreach($data as $key=>$value)
230 227
 				$this->add($key,$value);
231
-		}
232
-		else if($data!==null)
228
+		} else if($data!==null)
233 229
 			throw new TInvalidDataTypeException('map_data_not_iterable');
234 230
 	}
235 231
 
Please login to merge, or discard this patch.
framework/Collections/TList.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -155,11 +155,9 @@  discard block
 block discarded – undo
155 155
 			{
156 156
 				array_splice($this->_d,$index,0,array($item));
157 157
 				$this->_c++;
158
-			}
159
-			else
158
+			} else
160 159
 				throw new TInvalidDataValueException('list_index_invalid',$index);
161
-		}
162
-		else
160
+		} else
163 161
 			throw new TInvalidOperationException('list_readonly',get_class($this));
164 162
 	}
165 163
 
@@ -180,11 +178,9 @@  discard block
 block discarded – undo
180 178
 			{
181 179
 				$this->removeAt($index);
182 180
 				return $index;
183
-			}
184
-			else
181
+			} else
185 182
 				throw new TInvalidDataValueException('list_item_inexistent');
186
-		}
187
-		else
183
+		} else
188 184
 			throw new TInvalidOperationException('list_readonly',get_class($this));
189 185
 	}
190 186
 
@@ -210,11 +206,9 @@  discard block
 block discarded – undo
210 206
 					array_splice($this->_d,$index,1);
211 207
 					return $item;
212 208
 				}
213
-			}
214
-			else
209
+			} else
215 210
 				throw new TInvalidDataValueException('list_index_invalid',$index);
216
-		}
217
-		else
211
+		} else
218 212
 			throw new TInvalidOperationException('list_readonly',get_class($this));
219 213
 	}
220 214
 
@@ -268,8 +262,7 @@  discard block
 block discarded – undo
268 262
 			$this->insertAt($index, $item);
269 263
 
270 264
 			return $index;
271
-		}
272
-		else
265
+		} else
273 266
 			throw new TInvalidOperationException('list_readonly',get_class($this));
274 267
 	}
275 268
 
@@ -292,8 +285,7 @@  discard block
 block discarded – undo
292 285
 			$this->insertAt($index + 1, $item);
293 286
 
294 287
 			return $index + 1;
295
-		}
296
-		else
288
+		} else
297 289
 			throw new TInvalidOperationException('list_readonly',get_class($this));
298 290
 	}
299 291
 
@@ -319,8 +311,7 @@  discard block
 block discarded – undo
319 311
 				$this->clear();
320 312
 			foreach($data as $item)
321 313
 				$this->add($item);
322
-		}
323
-		else if($data!==null)
314
+		} else if($data!==null)
324 315
 			throw new TInvalidDataTypeException('list_data_not_iterable');
325 316
 	}
326 317
 
@@ -336,8 +327,7 @@  discard block
 block discarded – undo
336 327
 		{
337 328
 			foreach($data as $item)
338 329
 				$this->add($item);
339
-		}
340
-		else if($data!==null)
330
+		} else if($data!==null)
341 331
 			throw new TInvalidDataTypeException('list_data_not_iterable');
342 332
 	}
343 333
 
Please login to merge, or discard this patch.
framework/I18N/core/MessageFormat.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,8 +213,7 @@
 block discarded – undo
213 213
 						return 	$this->postscript[0].
214 214
 								strtr($string, $args).
215 215
 								$this->postscript[1];		
216
-					}
217
-					else
216
+					} else
218 217
 						return strtr($target, $args);
219 218
 				}
220 219
 			}
Please login to merge, or discard this patch.
framework/I18N/core/MessageSource_gettext.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -260,8 +260,7 @@  discard block
 block discarded – undo
260 260
 				if(!empty($this->cache))
261 261
 					$this->cache->clean($variant, $this->culture);
262 262
 				return true;
263
-			}
264
-			else
263
+			} else
265 264
 				return false;
266 265
 		}
267 266
 		return false;
@@ -304,8 +303,7 @@  discard block
 block discarded – undo
304 303
 					if(!empty($this->cache))
305 304
 						$this->cache->clean($variant, $this->culture);
306 305
 					return true;
307
-				}
308
-				else
306
+				} else
309 307
 					return false;
310 308
 			}
311 309
 		}
@@ -354,8 +352,7 @@  discard block
 block discarded – undo
354 352
 					if(!empty($this->cache))
355 353
 						$this->cache->clean($variant, $this->culture);
356 354
 					return true;
357
-				}
358
-				else
355
+				} else
359 356
 					return false;
360 357
 			}
361 358
 		}
Please login to merge, or discard this patch.
framework/Security/TAuthorizationRule.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
 				{
99 99
 					$this->_everyone=true;
100 100
 					break;
101
-				}
102
-				else if($user==='?')
101
+				} else if($user==='?')
103 102
 					$this->_guest=true;
104 103
 				else if($user==='@')
105 104
 					$this->_authenticated=true;
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php 1 patch
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@  discard block
 block discarded – undo
98 98
 			{
99 99
 				$found = true;
100 100
 				$childs[$key][$node] = array();
101
-			}
102
-			else
101
+			} else
103 102
 			{
104 103
 				$found = $found || $this->addNode($childs[$key], $parent, $node);
105 104
 			}
@@ -112,8 +111,9 @@  discard block
 block discarded – undo
112 111
 	 */
113 112
 	public function collect()
114 113
 	{
115
-		while(count($this->_tree) > 0)
116
-			$this->collectChildren(null, $this->_tree);
114
+		while(count($this->_tree) > 0) {
115
+					$this->collectChildren(null, $this->_tree);
116
+		}
117 117
 		return $this->getCollection();
118 118
 	}
119 119
 
@@ -146,8 +146,7 @@  discard block
 block discarded – undo
146 146
 			{
147 147
 				$childs[] = $key;
148 148
 				unset($nodes[$key]);
149
-			}
150
-			else
149
+			} else
151 150
 				$this->collectChildren($key, $nodes[$key]);
152 151
 		}
153 152
 		if(count($childs) > 0)
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TMappedStatement.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -249,8 +249,7 @@  discard block
 block discarded – undo
249 249
 				$param = new TResultSetListItemParameter($obj, $parameter, $list);
250 250
 				$this->raiseRowDelegate($delegate, $param);
251 251
 			}
252
-		}
253
-		else
252
+		} else
254 253
 		{
255 254
 			//var_dump($sql,$parameter);
256 255
 			foreach($reader as $row)
@@ -326,8 +325,7 @@  discard block
 block discarded – undo
326 325
 				$param = new TResultSetMapItemParameter($key, $value, $parameter, $map);
327 326
 				$this->raiseRowDelegate($delegate, $param);
328 327
 			}
329
-		}
330
-		else
328
+		} else
331 329
 		{
332 330
 			//while($row = $recordSet->fetchRow())
333 331
 			foreach($reader as $row)
@@ -353,8 +351,7 @@  discard block
 block discarded – undo
353 351
 		if(is_string($handler))
354 352
 		{
355 353
 			call_user_func($handler,$this,$param);
356
-		}
357
-		else if(is_callable($handler,true))
354
+		} else if(is_callable($handler,true))
358 355
 		{
359 356
 			// an array: 0 - object, 1 - method name/path
360 357
 			list($object,$method)=$handler;
@@ -369,8 +366,7 @@  discard block
 block discarded – undo
369 366
 				}
370 367
 				$object->$method($this,$param);
371 368
 			}
372
-		}
373
-		else
369
+		} else
374 370
 			throw new TInvalidDataValueException('sqlmap_invalid_delegate', $this->getID(), $handler);
375 371
 	}
376 372
 
@@ -532,8 +528,7 @@  discard block
 block discarded – undo
532 528
 				if($method == self::QUERY_FOR_ARRAY)
533 529
 					$values = $values->toArray();
534 530
 				TPropertyAccess::set($resultObject, $property, $values);
535
-			}
536
-			else if($method == self::QUERY_FOR_OBJECT)
531
+			} else if($method == self::QUERY_FOR_OBJECT)
537 532
 			{
538 533
 				$value = $statement->executeQueryForObject($connection, $keys, null);
539 534
 				TPropertyAccess::set($resultObject, $property, $value);
@@ -663,8 +658,7 @@  discard block
 block discarded – undo
663 658
 			else
664 659
 				foreach($resultMap->getColumns() as $property)
665 660
 					$this->setObjectProperty($resultMap, $property, $row, $resultObject);
666
-		}
667
-		else
661
+		} else
668 662
 		{
669 663
 			$resultObject = $this->fillDefaultResultMap($resultMap, $row, $resultObject);
670 664
 		}
@@ -809,8 +803,7 @@  discard block
 block discarded – undo
809 803
 		if($key === '')
810 804
 		{
811 805
 			$resultObject = $property->getPropertyValue($registry,$row);
812
-		}
813
-		else if(strlen($select) == 0 && ($nested===null))
806
+		} else if(strlen($select) == 0 && ($nested===null))
814 807
 		{
815 808
 			$value = $property->getPropertyValue($registry,$row);
816 809
 
@@ -819,8 +812,7 @@  discard block
 block discarded – undo
819 812
 				TPropertyAccess::set($resultObject, $key, $value);
820 813
 			else
821 814
 				$resultObject = $value;
822
-		}
823
-		else if($nested!==null)
815
+		} else if($nested!==null)
824 816
 		{
825 817
 			if($property->instanceOfListType($resultObject) || $property->instanceOfArrayType($resultObject))
826 818
 			{
@@ -828,16 +820,14 @@  discard block
 block discarded – undo
828 820
 					throw new TSqlMapExecutionException(
829 821
 						'sqlmap_non_groupby_array_list_type', $resultMap->getID(),
830 822
 						get_class($resultObject), $key);
831
-			}
832
-			else
823
+			} else
833 824
 			{
834 825
 				$obj = $nested->createInstanceOfResult($this->getManager()->getTypeHandlers());
835 826
 				if($this->fillPropertyWithResultMap($nested, $row, $obj) == false)
836 827
 					$obj = null;
837 828
 				TPropertyAccess::set($resultObject, $key, $obj);
838 829
 			}
839
-		}
840
-		else //'select' ResultProperty
830
+		} else //'select' ResultProperty
841 831
 		{
842 832
 			$this->enquequePostSelect($select, $resultMap, $property, $row, $resultObject);
843 833
 		}
@@ -869,11 +859,9 @@  discard block
 block discarded – undo
869 859
 				$values = TLazyLoadList::newInstance($statement, $key,
870 860
 								$resultObject, $property->getProperty());
871 861
 				TPropertyAccess::set($resultObject, $property->getProperty(), $values);
872
-			}
873
-			else
862
+			} else
874 863
 				$postSelect->setMethod(self::QUERY_FOR_LIST);
875
-		}
876
-		else if($property->instanceOfArrayType($resultObject))
864
+		} else if($property->instanceOfArrayType($resultObject))
877 865
 			$postSelect->setMethod(self::QUERY_FOR_ARRAY);
878 866
 		else
879 867
 			$postSelect->setMethod(self::QUERY_FOR_OBJECT);
@@ -901,8 +889,7 @@  discard block
 block discarded – undo
901 889
 				$keys[trim($pair[0])] = $row[trim($pair[1])];
902 890
 			}
903 891
 			return $keys;
904
-		}
905
-		else
892
+		} else
906 893
 		{
907 894
 			$registry=$this->getManager()->getTypeHandlers();
908 895
 			return $property->getPropertyValue($registry,$row);
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
@@ -216,13 +216,11 @@
 block discarded – undo
216 216
 				$str.=$element->toString($indent+1)."\n";
217 217
 			$str.=$prefix."</{$this->_tagName}>";
218 218
 			return $str;
219
-		}
220
-		else if(($value=$this->getValue())!=='')
219
+		} else if(($value=$this->getValue())!=='')
221 220
 		{
222 221
 			$value=$this->xmlEncode($value);
223 222
 			return $prefix."<{$this->_tagName}$attr>$value</{$this->_tagName}>";
224
-		}
225
-		else
223
+		} else
226 224
 			return $prefix."<{$this->_tagName}$attr />";
227 225
 	}
228 226
 
Please login to merge, or discard this patch.
framework/Collections/TPriorityList.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -390,8 +390,7 @@  discard block
 block discarded – undo
390 390
 			}
391 391
 			$this->removeAtIndexInPriority($p[1],$p[0]);
392 392
 			return $p[2];
393
-		}
394
-		else
393
+		} else
395 394
 			throw new TInvalidDataValueException('list_item_inexistent');
396 395
 	}
397 396
 
@@ -676,14 +675,12 @@  discard block
 block discarded – undo
676 675
 				foreach($data->itemsAtPriority($priority) as $index=>$item)
677 676
 					$this->insertAtIndexInPriority($item,false,$priority);
678 677
 			}
679
-		}
680
-		else if(is_array($data)||$data instanceof \Traversable)
678
+		} else if(is_array($data)||$data instanceof \Traversable)
681 679
 		{
682 680
 			foreach($data as $priority=>$item)
683 681
 				$this->add($item);
684 682
 
685
-		}
686
-		else if($data!==null)
683
+		} else if($data!==null)
687 684
 			throw new TInvalidDataTypeException('map_data_not_iterable');
688 685
 	}
689 686
 
Please login to merge, or discard this patch.