Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created
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/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
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/Xml/TXmlElementList.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
framework/Xml/TXmlDocument.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
framework/Vendor/WsdlGen/WsdlGenerator.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -164,22 +164,18 @@  discard block
 block discarded – undo
164 164
 					$param['name'] = $match[2];
165 165
 					$param['desc'] = $match[3];
166 166
 					$params[] = $param;
167
-				}
168
-				else if (preg_match('/^@return\s+([\w\[\]()]+)\s*(.*)/i', $line, $match)) {
167
+				} else if (preg_match('/^@return\s+([\w\[\]()]+)\s*(.*)/i', $line, $match)) {
169 168
 					$gotParams = true;
170 169
 					$return['type'] = $this->convertType($match[1]);
171 170
 					$return['desc'] = $match[2];
172 171
 					$return['name'] = 'return';
173 172
 				}
174
-			}
175
-			else {
173
+			} else {
176 174
 				if (!$gotDesc) {
177 175
 					$methodDoc .= trim($line);
178
-				}
179
-				else if (!$gotParams) {
176
+				} else if (!$gotParams) {
180 177
 					$params[count($params)-1]['desc'] .= trim($line);
181
-				}
182
-				else {
178
+				} else {
183 179
 					if ($line == '*/') continue;
184 180
 					$return['desc'] .= trim($line);
185 181
 				}
@@ -250,8 +246,7 @@  discard block
 block discarded – undo
250 246
              	 	$type = $className . 'Array';
251 247
              	 	$this->types[$type] = '';
252 248
              	 	$this->convertType($className);
253
-             	 }
254
-             	 else
249
+             	 } else
255 250
              	 {
256 251
              	 	 if(!isset($this->types[$type]))
257 252
 	             		$this->extractClassProperties($type);
Please login to merge, or discard this patch.
framework/Vendor/WsdlGen/Wsdl.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,7 @@
 block discarded – undo
158 158
 				$e->setAttribute('maxOccurs','unbounded');
159 159
 				$sequence->appendChild($e);
160 160
 				$complexType->appendChild($sequence);
161
-			}
162
-			else
161
+			} else
163 162
 			{
164 163
 				$all = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:all');
165 164
 				foreach($elements as $elem)
Please login to merge, or discard this patch.
framework/Vendor/PhpShell/php-shell-init.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 	require_once "PHP/Shell/Extensions/InlineHelp.php";
35 35
 	require_once "PHP/Shell/Extensions/VerbosePrint.php";
36 36
 	require_once "PHP/Shell/Extensions/LoadScript.php";
37
-}
38
-else
37
+} else
39 38
 {
40 39
 	require_once(dirname(__FILE__)."/PHP/Shell.php");
41 40
 	require_once(dirname(__FILE__)."/PHP/Shell/Extensions/Autoload.php");
Please login to merge, or discard this patch.