Completed
Push — intl ( b391f2...20c33e )
by Fabio
08:04
created
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.
framework/Collections/TPriorityMap.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -364,13 +364,11 @@  discard block
 block discarded – undo
364 364
 			if(!isset($this->_d[$priority])) {
365 365
 				$this->_d[$priority]=array($key=>$value);
366 366
 				$this->_o=false;
367
-			}
368
-			else
367
+			} else
369 368
 				$this->_d[$priority][$key]=$value;
370 369
 			$this->_c++;
371 370
 			$this->_fd=null;
372
-		}
373
-		else
371
+		} else
374 372
 			throw new TInvalidOperationException('map_readonly',get_class($this));
375 373
 		return $priority;
376 374
 	}
@@ -412,8 +410,7 @@  discard block
 block discarded – undo
412 410
 						return $value;
413 411
 					}
414 412
 				return null;
415
-			}
416
-			else
413
+			} else
417 414
 			{
418 415
 				$priority=(string)round(TPropertyValue::ensureFloat($priority),$this->_p);
419 416
 				if(isset($this->_d[$priority])&&(isset($this->_d[$priority][$key])||array_key_exists($key,$this->_d[$priority])))
@@ -427,12 +424,10 @@  discard block
 block discarded – undo
427 424
 					}
428 425
 					$this->_fd=null;
429 426
 					return $value;
430
-				}
431
-				else
427
+				} else
432 428
 					return null;
433 429
 			}
434
-		}
435
-		else
430
+		} else
436 431
 			throw new TInvalidOperationException('map_readonly',get_class($this));
437 432
 	}
438 433
 
@@ -525,15 +520,13 @@  discard block
 block discarded – undo
525 520
 					$this->add($key,$value,$priority);
526 521
 				}
527 522
 			}
528
-		}
529
-		else if(is_array($data)||$data instanceof \Traversable)
523
+		} else if(is_array($data)||$data instanceof \Traversable)
530 524
 		{
531 525
 			if($this->getCount()>0)
532 526
 				$this->clear();
533 527
 			foreach($data as $key=>$value)
534 528
 				$this->add($key,$value);
535
-		}
536
-		else if($data!==null)
529
+		} else if($data!==null)
537 530
 			throw new TInvalidDataTypeException('map_data_not_iterable');
538 531
 	}
539 532
 
@@ -553,13 +546,11 @@  discard block
 block discarded – undo
553 546
 				foreach($data->itemsAtPriority($priority) as $key => $value)
554 547
 					$this->add($key,$value,$priority);
555 548
 			}
556
-		}
557
-		else if(is_array($data)||$data instanceof \Traversable)
549
+		} else if(is_array($data)||$data instanceof \Traversable)
558 550
 		{
559 551
 			foreach($data as $key=>$value)
560 552
 				$this->add($key,$value);
561
-		}
562
-		else if($data!==null)
553
+		} else if($data!==null)
563 554
 			throw new TInvalidDataTypeException('map_data_not_iterable');
564 555
 	}
565 556
 
Please login to merge, or discard this patch.
framework/TPropertyValue.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,11 +123,9 @@  discard block
 block discarded – undo
123 123
 			{
124 124
 				eval('$array=array'.$value.';');
125 125
 				return $array;
126
-			}
127
-			else
126
+			} else
128 127
 				return $len>0?array($value):array();
129
-		}
130
-		else
128
+		} else
131 129
 			return (array)$value;
132 130
 	}
133 131
 
@@ -170,8 +168,7 @@  discard block
 block discarded – undo
170 168
 				throw new TInvalidDataValueException(
171 169
 					'propertyvalue_enumvalue_invalid',$value,
172 170
 						implode(' | ',$types[$enums]->getConstants()));
173
-		}
174
-		else if(!is_array($enums))
171
+		} else if(!is_array($enums))
175 172
 		{
176 173
 			$enums=func_get_args();
177 174
 			array_shift($enums);
Please login to merge, or discard this patch.
framework/Util/TBrowserLogRoute.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@  discard block
 block discarded – undo
42 42
 			{
43 43
 				$timing['delta'] = $logs[$i+1][3] - $logs[$i][3];
44 44
 				$timing['total'] = $logs[$i+1][3] - $first;
45
-			}
46
-			else
45
+			} else
47 46
 			{
48 47
 				$timing['delta'] = '?';
49 48
 				$timing['total'] = $logs[$i][3] - $first;
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 		<th>Category</th><th>Message</th><th>Time Spent (s)</th><th>Cumulated Time Spent (s)</th>
87 86
 	</tr>
88 87
 EOD;
89
-		}
90
-		else
88
+		} else
91 89
 		{
92 90
 			$string = <<<EOD
93 91
 <table cellspacing="0" cellpadding="2" border="0" width="100%" style="table-layout:auto">
@@ -124,8 +122,7 @@  discard block
 block discarded – undo
124 122
 		<td class="cumulatedtime">{$total}</td>
125 123
 	</tr>
126 124
 EOD;
127
-		}
128
-		else
125
+		} else
129 126
 		{
130 127
 			$bgcolor = $info['even'] ? "#fff" : "#eee";
131 128
 			$color = $this->getColorLevel($log[1]);
@@ -167,8 +164,7 @@  discard block
 block discarded – undo
167 164
 			{
168 165
 				$string .= '<span class="level'.$level.'">'.strtoupper($name)."</span>";
169 166
 			}
170
-		}
171
-		else
167
+		} else
172 168
 		{
173 169
 			$string .= "<tr><td colspan=\"5\" style=\"text-align:center; background-color:black; border-top: 1px solid #ccc; padding:0.2em;\">";
174 170
 			foreach(self::$_levelValues as $name => $level)
Please login to merge, or discard this patch.