Passed
Pull Request — master (#195)
by Jonathan
06:35
created
templates/admin/fieldmaps-list.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 			</td>
42 42
 		</tr>
43 43
 			<?php } ?>
44
-		<?php else : ?>
44
+		<?php else {
45
+	: ?>
45 46
 		<tr>
46 47
 			<td colspan="4">
47 48
 				<p>
@@ -51,6 +52,7 @@  discard block
 block discarded – undo
51 52
 						esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add' ) ),
52 53
 						esc_html__( 'add one' )
53 54
 					);
55
+}
54 56
 				?>
55 57
 				</p>
56 58
 			</td>
Please login to merge, or discard this patch.
developerforce/force.com-toolkit-for-php/soapclient/SforceBaseClient.php 1 patch
Braces   +26 added lines, -10 removed lines patch added patch discarded remove patch
@@ -684,8 +684,9 @@  discard block
 block discarded – undo
684 684
 		$this->setHeaders("describeLayout");
685 685
 		$arg = new stdClass();
686 686
 		$arg->sObjectType = new SoapVar($type, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
687
-		if (isset($recordTypeIds) && count($recordTypeIds)) 
688
-			$arg->recordTypeIds = $recordTypeIds;
687
+		if (isset($recordTypeIds) && count($recordTypeIds)) {
688
+					$arg->recordTypeIds = $recordTypeIds;
689
+		}
689 690
 		return $this->sforce->describeLayout($arg)->result;
690 691
 	}
691 692
 
@@ -988,7 +989,9 @@  discard block
 block discarded – undo
988 989
 		while ($this->pointer >= count($this->records)) {
989 990
 			// Pointer is larger than (current) result set; see if we can fetch more
990 991
 			if ($this->done === false) {
991
-				if ($this->sf === false) throw new Exception("Dependency not met!");
992
+				if ($this->sf === false) {
993
+					throw new Exception("Dependency not met!");
994
+				}
992 995
 				$response = $this->sf->queryMore($this->queryLocator);
993 996
 				$this->records = array_merge($this->records, $response->records); // Append more results
994 997
 				$this->done = $response->done;
@@ -997,7 +1000,9 @@  discard block
 block discarded – undo
997 1000
 				return false; // No more records to fetch
998 1001
 			}
999 1002
 		}
1000
-		if (isset($this->records[$this->pointer])) return true;
1003
+		if (isset($this->records[$this->pointer])) {
1004
+			return true;
1005
+		}
1001 1006
 		
1002 1007
 		throw new Exception("QueryResult has gaps in the record data?");
1003 1008
 	}
@@ -1145,8 +1150,9 @@  discard block
 block discarded – undo
1145 1150
 		$array = $this->xml2array('<Object xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'.$str.'</Object>', 2);
1146 1151
 
1147 1152
 		$xml = new stdClass();
1148
-		if (!count($array['Object']))
1149
-			return $xml;
1153
+		if (!count($array['Object'])) {
1154
+					return $xml;
1155
+		}
1150 1156
 
1151 1157
 		foreach ($array['Object'] as $k=>$v) {
1152 1158
 			$xml->$k = $v;
@@ -1164,7 +1170,9 @@  discard block
 block discarded – undo
1164 1170
 	 * @return array
1165 1171
 	 */
1166 1172
 	function xml2array($contents, $get_attributes=1) {
1167
-		if(!$contents) return array();
1173
+		if(!$contents) {
1174
+			return array();
1175
+		}
1168 1176
 
1169 1177
 		if(!function_exists('xml_parser_create')) {
1170 1178
 			//print "'xml_parser_create()' function not found!";
@@ -1177,7 +1185,10 @@  discard block
 block discarded – undo
1177 1185
 		xml_parse_into_struct( $parser, $contents, $xml_values );
1178 1186
 		xml_parser_free( $parser );
1179 1187
 
1180
-		if(!$xml_values) return;//Hmm...
1188
+		if(!$xml_values) {
1189
+			return;
1190
+		}
1191
+		//Hmm...
1181 1192
 
1182 1193
 		//Initializations
1183 1194
 		$xml_array = array();
@@ -1200,12 +1211,17 @@  discard block
 block discarded – undo
1200 1211
 				switch ($get_attributes) {
1201 1212
 					case 1:
1202 1213
 						$result = array();
1203
-						if(isset($value)) $result['value'] = $value;
1214
+						if(isset($value)) {
1215
+							$result['value'] = $value;
1216
+						}
1204 1217
 
1205 1218
 						//Set the attributes too.
1206 1219
 						if(isset($attributes)) {
1207 1220
 							foreach($attributes as $attr => $val) {
1208
-								if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
1221
+								if($get_attributes == 1) {
1222
+									$result['attr'][$attr] = $val;
1223
+								}
1224
+								//Set all the attributes in a array called 'attr'
1209 1225
 								/**  :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */
1210 1226
 							}
1211 1227
 						}
Please login to merge, or discard this patch.
developerforce/force.com-toolkit-for-php/soapclient/SforcePartnerClient.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
   			$sobject = new SObject($r);
217 217
   			array_push($arr,$sobject);
218 218
   		};
219
-  	}else {
219
+  	} else {
220 220
   		$sobject = new SObject($response);
221 221
         array_push($arr, $sobject);
222 222
   	}
Please login to merge, or discard this patch.