Passed
Push — main ( aaef5c...e4c121 )
by TARIQ
71:39
created
wp/wp-includes/SimplePie/Net/IPv6.php 1 patch
Braces   +17 added lines, -14 removed lines patch added patch discarded remove patch
@@ -85,16 +85,14 @@  discard block
 block discarded – undo
85 85
 			if ($ip1 === '')
86 86
 			{
87 87
 				$c1 = -1;
88
-			}
89
-			else
88
+			} else
90 89
 			{
91 90
 				$c1 = substr_count($ip1, ':');
92 91
 			}
93 92
 			if ($ip2 === '')
94 93
 			{
95 94
 				$c2 = -1;
96
-			}
97
-			else
95
+			} else
98 96
 			{
99 97
 				$c2 = substr_count($ip2, ':');
100 98
 			}
@@ -221,30 +219,35 @@  discard block
 block discarded – undo
221 219
 			foreach ($ipv6 as $ipv6_part)
222 220
 			{
223 221
 				// The section can't be empty
224
-				if ($ipv6_part === '')
225
-					return false;
222
+				if ($ipv6_part === '') {
223
+									return false;
224
+				}
226 225
 
227 226
 				// Nor can it be over four characters
228
-				if (strlen($ipv6_part) > 4)
229
-					return false;
227
+				if (strlen($ipv6_part) > 4) {
228
+									return false;
229
+				}
230 230
 
231 231
 				// Remove leading zeros (this is safe because of the above)
232 232
 				$ipv6_part = ltrim($ipv6_part, '0');
233
-				if ($ipv6_part === '')
234
-					$ipv6_part = '0';
233
+				if ($ipv6_part === '') {
234
+									$ipv6_part = '0';
235
+				}
235 236
 
236 237
 				// Check the value is valid
237 238
 				$value = hexdec($ipv6_part);
238
-				if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF)
239
-					return false;
239
+				if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF) {
240
+									return false;
241
+				}
240 242
 			}
241 243
 			if (count($ipv4) === 4)
242 244
 			{
243 245
 				foreach ($ipv4 as $ipv4_part)
244 246
 				{
245 247
 					$value = (int) $ipv4_part;
246
-					if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF)
247
-						return false;
248
+					if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF) {
249
+											return false;
250
+					}
248 251
 				}
249 252
 			}
250 253
 			return true;
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/File.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@  discard block
 block discarded – undo
124 124
 				{
125 125
 					$this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp);
126 126
 					$this->success = false;
127
-				}
128
-				else
127
+				} else
129 128
 				{
130 129
 					// Use the updated url provided by curl_getinfo after any redirects.
131 130
 					if ($info = curl_getinfo($fp)) {
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
 						}
151 150
 					}
152 151
 				}
153
-			}
154
-			else
152
+			} else
155 153
 			{
156 154
 				$this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN;
157 155
 				$url_parts = parse_url($url);
@@ -170,8 +168,7 @@  discard block
 block discarded – undo
170 168
 				{
171 169
 					$this->error = 'fsockopen error: ' . $errstr;
172 170
 					$this->success = false;
173
-				}
174
-				else
171
+				} else
175 172
 				{
176 173
 					stream_set_timeout($fp, $timeout);
177 174
 					if (isset($url_parts['path']))
@@ -179,13 +176,11 @@  discard block
 block discarded – undo
179 176
 						if (isset($url_parts['query']))
180 177
 						{
181 178
 							$get = "$url_parts[path]?$url_parts[query]";
182
-						}
183
-						else
179
+						} else
184 180
 						{
185 181
 							$get = $url_parts['path'];
186 182
 						}
187
-					}
188
-					else
183
+					} else
189 184
 					{
190 185
 						$get = '/';
191 186
 					}
@@ -245,8 +240,7 @@  discard block
 block discarded – undo
245 240
 										{
246 241
 											$this->error = 'Unable to decode HTTP "gzip" stream';
247 242
 											$this->success = false;
248
-										}
249
-										else
243
+										} else
250 244
 										{
251 245
 											$this->body = trim($decoder->data);
252 246
 										}
@@ -256,16 +250,13 @@  discard block
 block discarded – undo
256 250
 										if (($decompressed = gzinflate($this->body)) !== false)
257 251
 										{
258 252
 											$this->body = $decompressed;
259
-										}
260
-										else if (($decompressed = gzuncompress($this->body)) !== false)
253
+										} else if (($decompressed = gzuncompress($this->body)) !== false)
261 254
 										{
262 255
 											$this->body = $decompressed;
263
-										}
264
-										else if (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false)
256
+										} else if (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false)
265 257
 										{
266 258
 											$this->body = $decompressed;
267
-										}
268
-										else
259
+										} else
269 260
 										{
270 261
 											$this->error = 'Unable to decode HTTP "deflate" stream';
271 262
 											$this->success = false;
@@ -278,8 +269,7 @@  discard block
 block discarded – undo
278 269
 								}
279 270
 							}
280 271
 						}
281
-					}
282
-					else
272
+					} else
283 273
 					{
284 274
 						$this->error = 'fsocket timed out';
285 275
 						$this->success = false;
@@ -287,8 +277,7 @@  discard block
 block discarded – undo
287 277
 					fclose($fp);
288 278
 				}
289 279
 			}
290
-		}
291
-		else
280
+		} else
292 281
 		{
293 282
 			$this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS;
294 283
 			if (empty($url) || !($this->body = trim(file_get_contents($url))))
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/Parser.php 1 patch
Braces   +41 added lines, -47 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
 		if (strtoupper($encoding) === 'US-ASCII')
95 95
 		{
96 96
 			$this->encoding = 'UTF-8';
97
-		}
98
-		else
97
+		} else
99 98
 		{
100 99
 			$this->encoding = $encoding;
101 100
 		}
@@ -134,8 +133,7 @@  discard block
 block discarded – undo
134 133
 			{
135 134
 				$data = substr($data, $pos + 2);
136 135
 				$data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' ."\n". $this->declare_html_entities() . $data;
137
-			}
138
-			else
136
+			} else
139 137
 			{
140 138
 				$this->error_string = 'SimplePie bug! Please report this!';
141 139
 				return false;
@@ -182,8 +180,7 @@  discard block
 block discarded – undo
182 180
 					}
183 181
 				} while (!feof($stream));
184 182
 				fclose($stream);
185
-			}
186
-			else
183
+			} else
187 184
 			{
188 185
 				$return = false;
189 186
 			}
@@ -207,8 +204,7 @@  discard block
 block discarded – undo
207 204
 					if ($xml->namespaceURI !== '')
208 205
 					{
209 206
 						$tagName = $xml->namespaceURI . $this->separator . $xml->localName;
210
-					}
211
-					else
207
+					} else
212 208
 					{
213 209
 						$tagName = $xml->localName;
214 210
 					}
@@ -219,8 +215,7 @@  discard block
 block discarded – undo
219 215
 					if ($xml->namespaceURI !== '')
220 216
 					{
221 217
 						$tagName = $xml->namespaceURI . $this->separator . $xml->localName;
222
-					}
223
-					else
218
+					} else
224 219
 					{
225 220
 						$tagName = $xml->localName;
226 221
 					}
@@ -230,8 +225,7 @@  discard block
 block discarded – undo
230 225
 						if ($xml->namespaceURI !== '')
231 226
 						{
232 227
 							$attrName = $xml->namespaceURI . $this->separator . $xml->localName;
233
-						}
234
-						else
228
+						} else
235 229
 						{
236 230
 							$attrName = $xml->localName;
237 231
 						}
@@ -311,8 +305,7 @@  discard block
 block discarded – undo
311 305
 				$this->xml_base[] = $base;
312 306
 				$this->xml_base_explicit[] = true;
313 307
 			}
314
-		}
315
-		else
308
+		} else
316 309
 		{
317 310
 			$this->xml_base[] = end($this->xml_base);
318 311
 			$this->xml_base_explicit[] = end($this->xml_base_explicit);
@@ -321,8 +314,7 @@  discard block
 block discarded – undo
321 314
 		if (isset($attribs[SIMPLEPIE_NAMESPACE_XML]['lang']))
322 315
 		{
323 316
 			$this->xml_lang[] = $attribs[SIMPLEPIE_NAMESPACE_XML]['lang'];
324
-		}
325
-		else
317
+		} else
326 318
 		{
327 319
 			$this->xml_lang[] = end($this->xml_lang);
328 320
 		}
@@ -342,8 +334,7 @@  discard block
 block discarded – undo
342 334
 				}
343 335
 				$this->data['data'] .= '>';
344 336
 			}
345
-		}
346
-		else
337
+		} else
347 338
 		{
348 339
 			$this->datas[] =& $this->data;
349 340
 			$this->data =& $this->data['child'][end($this->namespace)][end($this->element)][];
@@ -364,8 +355,7 @@  discard block
 block discarded – undo
364 355
 		if ($this->current_xhtml_construct >= 0)
365 356
 		{
366 357
 			$this->data['data'] .= htmlspecialchars($cdata, ENT_QUOTES, $this->encoding);
367
-		}
368
-		else
358
+		} else
369 359
 		{
370 360
 			$this->data['data'] .= $cdata;
371 361
 		}
@@ -423,8 +413,7 @@  discard block
 block discarded – undo
423 413
 					$namespace = SIMPLEPIE_NAMESPACE_MEDIARSS;
424 414
 				}
425 415
 				$cache[$string] = array($namespace, $local_name);
426
-			}
427
-			else
416
+			} else
428 417
 			{
429 418
 				$cache[$string] = array('', $string);
430 419
 			}
@@ -444,8 +433,7 @@  discard block
 block discarded – undo
444 433
 				$link = $data['properties']['url'][0];
445 434
 				if ($name === '') {
446 435
 					$name = $link;
447
-				}
448
-				else {
436
+				} else {
449 437
 					// can't have commas in categories.
450 438
 					$name = str_replace(',', '', $name);
451 439
 				}
@@ -471,19 +459,24 @@  discard block
 block discarded – undo
471 459
 				break;
472 460
 			}
473 461
 			// Also look for h-feed or h-entry in the children of each top level item.
474
-			if (!isset($mf_item['children'][0]['type'])) continue;
462
+			if (!isset($mf_item['children'][0]['type'])) {
463
+			    continue;
464
+			}
475 465
 			if (in_array('h-feed', $mf_item['children'][0]['type'])) {
476 466
 				$h_feed = $mf_item['children'][0];
477 467
 				// In this case the parent of the h-feed may be an h-card, so use it as
478 468
 				// the feed_author.
479
-				if (in_array('h-card', $mf_item['type'])) $feed_author = $mf_item;
469
+				if (in_array('h-card', $mf_item['type'])) {
470
+				    $feed_author = $mf_item;
471
+				}
480 472
 				break;
481
-			}
482
-			else if (in_array('h-entry', $mf_item['children'][0]['type'])) {
473
+			} else if (in_array('h-entry', $mf_item['children'][0]['type'])) {
483 474
 				$entries = $mf_item['children'];
484 475
 				// In this case the parent of the h-entry list may be an h-card, so use
485 476
 				// it as the feed_author.
486
-				if (in_array('h-card', $mf_item['type'])) $feed_author = $mf_item;
477
+				if (in_array('h-card', $mf_item['type'])) {
478
+				    $feed_author = $mf_item;
479
+				}
487 480
 				break;
488 481
 			}
489 482
 		}
@@ -496,8 +489,7 @@  discard block
 block discarded – undo
496 489
 			if (isset($mf['items'][0]['properties']['author'][0])) {
497 490
 				$feed_author = $mf['items'][0]['properties']['author'][0];
498 491
 			}
499
-		}
500
-		else if (count($entries) === 0) {
492
+		} else if (count($entries) === 0) {
501 493
 			$entries = $mf['items'];
502 494
 		}
503 495
 		for ($i = 0; $i < count($entries); $i++) {
@@ -508,17 +500,23 @@  discard block
 block discarded – undo
508 500
 				$description = '';
509 501
 				if (isset($entry['properties']['url'][0])) {
510 502
 					$link = $entry['properties']['url'][0];
511
-					if (isset($link['value'])) $link = $link['value'];
503
+					if (isset($link['value'])) {
504
+					    $link = $link['value'];
505
+					}
512 506
 					$item['link'] = array(array('data' => $link));
513 507
 				}
514 508
 				if (isset($entry['properties']['uid'][0])) {
515 509
 					$guid = $entry['properties']['uid'][0];
516
-					if (isset($guid['value'])) $guid = $guid['value'];
510
+					if (isset($guid['value'])) {
511
+					    $guid = $guid['value'];
512
+					}
517 513
 					$item['guid'] = array(array('data' => $guid));
518 514
 				}
519 515
 				if (isset($entry['properties']['name'][0])) {
520 516
 					$title = $entry['properties']['name'][0];
521
-					if (isset($title['value'])) $title = $title['value'];
517
+					if (isset($title['value'])) {
518
+					    $title = $title['value'];
519
+					}
522 520
 					$item['title'] = array(array('data' => $title));
523 521
 				}
524 522
 				if (isset($entry['properties']['author'][0]) || isset($feed_author)) {
@@ -529,12 +527,10 @@  discard block
 block discarded – undo
529 527
 						$entry['properties']['author'][0] : $feed_author;
530 528
 					if (!is_string($author)) {
531 529
 						$author = $this->parse_hcard($author);
532
-					}
533
-					else if (strpos($author, 'http') === 0) {
530
+					} else if (strpos($author, 'http') === 0) {
534 531
 						if (isset($author_cache[$author])) {
535 532
 							$author = $author_cache[$author];
536
-						}
537
-						else {
533
+						} else {
538 534
 							$mf = Mf2\fetch($author);
539 535
 							foreach ($mf['items'] as $hcard) {
540 536
 								// Only interested in an h-card by itself in this case.
@@ -584,8 +580,7 @@  discard block
 block discarded – undo
584 580
 								'<img src="'.$photo_list[$j].'"></a>';
585 581
 						}
586 582
 						$description .= '<br><b>'.$count.' photos</b></p>';
587
-					}
588
-					else if ($count == 1) {
583
+					} else if ($count == 1) {
589 584
 						$description = '<p><img src="'.$photo_list[0].'"></p>';
590 585
 					}
591 586
 				}
@@ -602,8 +597,7 @@  discard block
 block discarded – undo
602 597
 						$in_reply_to = '';
603 598
 						if (is_string($entry['properties']['in-reply-to'][0])) {
604 599
 							$in_reply_to = $entry['properties']['in-reply-to'][0];
605
-						}
606
-						else if (isset($entry['properties']['in-reply-to'][0]['value'])) {
600
+						} else if (isset($entry['properties']['in-reply-to'][0]['value'])) {
607 601
 							$in_reply_to = $entry['properties']['in-reply-to'][0]['value'];
608 602
 						}
609 603
 						if ($in_reply_to !== '') {
@@ -617,12 +611,13 @@  discard block
 block discarded – undo
617 611
 					$category_csv = '';
618 612
 					// Categories can also contain h-cards.
619 613
 					foreach ($entry['properties']['category'] as $category) {
620
-						if ($category_csv !== '') $category_csv .= ', ';
614
+						if ($category_csv !== '') {
615
+						    $category_csv .= ', ';
616
+						}
621 617
 						if (is_string($category)) {
622 618
 							// Can't have commas in categories.
623 619
 							$category_csv .= str_replace(',', '', $category);
624
-						}
625
-						else {
620
+						} else {
626 621
 							$category_csv .= $this->parse_hcard($category, true);
627 622
 						}
628 623
 					}
@@ -653,8 +648,7 @@  discard block
 block discarded – undo
653 648
 		// Use the name given for the h-feed, or get the title from the html.
654 649
 		if ($feed_title !== '') {
655 650
 			$feed_title = array(array('data' => htmlspecialchars($feed_title)));
656
-		}
657
-		else if ($position = strpos($data, '<title>')) {
651
+		} else if ($position = strpos($data, '<title>')) {
658 652
 			$start = $position < 200 ? 0 : $position - 200;
659 653
 			$check = substr($data, $start, 400);
660 654
 			$matches = array();
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/Source.php 1 patch
Braces   +29 added lines, -58 removed lines patch added patch discarded remove patch
@@ -103,28 +103,22 @@  discard block
 block discarded – undo
103 103
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
104 104
 		{
105 105
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
106
-		}
107
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title'))
106
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title'))
108 107
 		{
109 108
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
110
-		}
111
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
109
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
112 110
 		{
113 111
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
114
-		}
115
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
112
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
116 113
 		{
117 114
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
118
-		}
119
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
115
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
120 116
 		{
121 117
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
122
-		}
123
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
118
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
124 119
 		{
125 120
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
126
-		}
127
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
121
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
128 122
 		{
129 123
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
130 124
 		}
@@ -174,8 +168,7 @@  discard block
 block discarded – undo
174 168
 			if (isset($category['attribs']['']['domain']))
175 169
 			{
176 170
 				$scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT);
177
-			}
178
-			else
171
+			} else
179 172
 			{
180 173
 				$scheme = null;
181 174
 			}
@@ -413,13 +406,11 @@  discard block
 block discarded – undo
413 406
 					{
414 407
 						$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]);
415 408
 						$this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key];
416
-					}
417
-					else
409
+					} else
418 410
 					{
419 411
 						$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key];
420 412
 					}
421
-				}
422
-				elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
413
+				} elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
423 414
 				{
424 415
 					$this->data['links'][substr($key, 41)] =& $this->data['links'][$key];
425 416
 				}
@@ -440,36 +431,28 @@  discard block
 block discarded – undo
440 431
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle'))
441 432
 		{
442 433
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
443
-		}
444
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline'))
434
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline'))
445 435
 		{
446 436
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
447
-		}
448
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
437
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
449 438
 		{
450 439
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
451
-		}
452
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
440
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
453 441
 		{
454 442
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
455
-		}
456
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
443
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
457 444
 		{
458 445
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
459
-		}
460
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
446
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
461 447
 		{
462 448
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
463
-		}
464
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
449
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
465 450
 		{
466 451
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
467
-		}
468
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
452
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
469 453
 		{
470 454
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
471
-		}
472
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
455
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
473 456
 		{
474 457
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
475 458
 		}
@@ -482,20 +465,16 @@  discard block
 block discarded – undo
482 465
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
483 466
 		{
484 467
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
485
-		}
486
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
468
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
487 469
 		{
488 470
 			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
489
-		}
490
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
471
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
491 472
 		{
492 473
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
493
-		}
494
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
474
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
495 475
 		{
496 476
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
497
-		}
498
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
477
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
499 478
 		{
500 479
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
501 480
 		}
@@ -508,16 +487,13 @@  discard block
 block discarded – undo
508 487
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
509 488
 		{
510 489
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
511
-		}
512
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language'))
490
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language'))
513 491
 		{
514 492
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
515
-		}
516
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language'))
493
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language'))
517 494
 		{
518 495
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
519
-		}
520
-		elseif (isset($this->data['xml_lang']))
496
+		} elseif (isset($this->data['xml_lang']))
521 497
 		{
522 498
 			return $this->sanitize($this->data['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
523 499
 		}
@@ -530,8 +506,7 @@  discard block
 block discarded – undo
530 506
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
531 507
 		{
532 508
 			return (float) $return[0]['data'];
533
-		}
534
-		elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
509
+		} elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
535 510
 		{
536 511
 			return (float) $match[1];
537 512
 		}
@@ -544,12 +519,10 @@  discard block
 block discarded – undo
544 519
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long'))
545 520
 		{
546 521
 			return (float) $return[0]['data'];
547
-		}
548
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
522
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
549 523
 		{
550 524
 			return (float) $return[0]['data'];
551
-		}
552
-		elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
525
+		} elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
553 526
 		{
554 527
 			return (float) $match[2];
555 528
 		}
@@ -562,12 +535,10 @@  discard block
 block discarded – undo
562 535
 		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image'))
563 536
 		{
564 537
 			return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI);
565
-		}
566
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo'))
538
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo'))
567 539
 		{
568 540
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
569
-		}
570
-		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon'))
541
+		} elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon'))
571 542
 		{
572 543
 			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
573 544
 		}
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/HTTP/Parser.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -203,13 +203,11 @@  discard block
 block discarded – undo
203 203
 				$this->http_version = (float) $this->http_version;
204 204
 				$this->position += strspn($this->data, "\x09\x20", $this->position);
205 205
 				$this->state = 'status';
206
-			}
207
-			else
206
+			} else
208 207
 			{
209 208
 				$this->state = false;
210 209
 			}
211
-		}
212
-		else
210
+		} else
213 211
 		{
214 212
 			$this->state = false;
215 213
 		}
@@ -225,8 +223,7 @@  discard block
 block discarded – undo
225 223
 			$this->status_code = (int) substr($this->data, $this->position, $len);
226 224
 			$this->position += $len;
227 225
 			$this->state = 'reason';
228
-		}
229
-		else
226
+		} else
230 227
 		{
231 228
 			$this->state = false;
232 229
 		}
@@ -256,8 +253,7 @@  discard block
 block discarded – undo
256 253
 			if (isset($this->headers[$this->name]) && $this->name !== 'content-type')
257 254
 			{
258 255
 				$this->headers[$this->name] .= ', ' . $this->value;
259
-			}
260
-			else
256
+			} else
261 257
 			{
262 258
 				$this->headers[$this->name] = $this->value;
263 259
 			}
@@ -268,13 +264,11 @@  discard block
 block discarded – undo
268 264
 		{
269 265
 			$this->position += 2;
270 266
 			$this->state = 'body';
271
-		}
272
-		elseif ($this->data[$this->position] === "\x0A")
267
+		} elseif ($this->data[$this->position] === "\x0A")
273 268
 		{
274 269
 			$this->position++;
275 270
 			$this->state = 'body';
276
-		}
277
-		else
271
+		} else
278 272
 		{
279 273
 			$this->state = 'name';
280 274
 		}
@@ -292,15 +286,13 @@  discard block
 block discarded – undo
292 286
 			{
293 287
 				$this->position += $len;
294 288
 				$this->state = 'new_line';
295
-			}
296
-			else
289
+			} else
297 290
 			{
298 291
 				$this->name = substr($this->data, $this->position, $len);
299 292
 				$this->position += $len + 1;
300 293
 				$this->state = 'value';
301 294
 			}
302
-		}
303
-		else
295
+		} else
304 296
 		{
305 297
 			$this->state = false;
306 298
 		}
@@ -316,8 +308,7 @@  discard block
 block discarded – undo
316 308
 			if (substr($this->data, $this->position, 2) === "\x0D\x0A")
317 309
 			{
318 310
 				$this->position += 2;
319
-			}
320
-			elseif ($this->data[$this->position] === "\x0A")
311
+			} elseif ($this->data[$this->position] === "\x0A")
321 312
 			{
322 313
 				$this->position++;
323 314
 			}
@@ -334,8 +325,7 @@  discard block
 block discarded – undo
334 325
 		if ($this->is_linear_whitespace())
335 326
 		{
336 327
 			$this->linear_whitespace();
337
-		}
338
-		else
328
+		} else
339 329
 		{
340 330
 			switch ($this->data[$this->position])
341 331
 			{
@@ -384,8 +374,7 @@  discard block
 block discarded – undo
384 374
 		if ($this->is_linear_whitespace())
385 375
 		{
386 376
 			$this->linear_whitespace();
387
-		}
388
-		else
377
+		} else
389 378
 		{
390 379
 			switch ($this->data[$this->position])
391 380
 			{
@@ -442,8 +431,7 @@  discard block
 block discarded – undo
442 431
 		{
443 432
 			unset($this->headers['transfer-encoding']);
444 433
 			$this->state = 'chunked';
445
-		}
446
-		else
434
+		} else
447 435
 		{
448 436
 			$this->state = 'emit';
449 437
 		}
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/IRI.php 1 patch
Braces   +55 added lines, -78 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
 		if (method_exists($this, 'set_' . $name))
151 151
 		{
152 152
 			call_user_func(array($this, 'set_' . $name), $value);
153
-		}
154
-		elseif (
153
+		} elseif (
155 154
 			   $name === 'iauthority'
156 155
 			|| $name === 'iuserinfo'
157 156
 			|| $name === 'ihost'
@@ -184,8 +183,7 @@  discard block
 block discarded – undo
184 183
 		)
185 184
 		{
186 185
 			$return = $this->{"get_$name"}();
187
-		}
188
-		elseif (array_key_exists($name, $props))
186
+		} elseif (array_key_exists($name, $props))
189 187
 		{
190 188
 			$return = $this->$name;
191 189
 		}
@@ -200,8 +198,7 @@  discard block
 block discarded – undo
200 198
 		{
201 199
 			$name = $prop;
202 200
 			$return = $this->$prop;
203
-		}
204
-		else
201
+		} else
205 202
 		{
206 203
 			trigger_error('Undefined property: ' . get_class($this) . '::' . $name, E_USER_NOTICE);
207 204
 			$return = null;
@@ -276,12 +273,10 @@  discard block
 block discarded – undo
276 273
 		if (!$relative->is_valid())
277 274
 		{
278 275
 			return false;
279
-		}
280
-		elseif ($relative->scheme !== null)
276
+		} elseif ($relative->scheme !== null)
281 277
 		{
282 278
 			return clone $relative;
283
-		}
284
-		else
279
+		} else
285 280
 		{
286 281
 			if (!($base instanceof SimplePie_IRI))
287 282
 			{
@@ -295,8 +290,7 @@  discard block
 block discarded – undo
295 290
 					{
296 291
 						$target = clone $relative;
297 292
 						$target->scheme = $base->scheme;
298
-					}
299
-					else
293
+					} else
300 294
 					{
301 295
 						$target = new SimplePie_IRI;
302 296
 						$target->scheme = $base->scheme;
@@ -308,38 +302,32 @@  discard block
 block discarded – undo
308 302
 							if ($relative->ipath[0] === '/')
309 303
 							{
310 304
 								$target->ipath = $relative->ipath;
311
-							}
312
-							elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '')
305
+							} elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '')
313 306
 							{
314 307
 								$target->ipath = '/' . $relative->ipath;
315
-							}
316
-							elseif (($last_segment = strrpos($base->ipath, '/')) !== false)
308
+							} elseif (($last_segment = strrpos($base->ipath, '/')) !== false)
317 309
 							{
318 310
 								$target->ipath = substr($base->ipath, 0, $last_segment + 1) . $relative->ipath;
319
-							}
320
-							else
311
+							} else
321 312
 							{
322 313
 								$target->ipath = $relative->ipath;
323 314
 							}
324 315
 							$target->ipath = $target->remove_dot_segments($target->ipath);
325 316
 							$target->iquery = $relative->iquery;
326
-						}
327
-						else
317
+						} else
328 318
 						{
329 319
 							$target->ipath = $base->ipath;
330 320
 							if ($relative->iquery !== null)
331 321
 							{
332 322
 								$target->iquery = $relative->iquery;
333
-							}
334
-							elseif ($base->iquery !== null)
323
+							} elseif ($base->iquery !== null)
335 324
 							{
336 325
 								$target->iquery = $base->iquery;
337 326
 							}
338 327
 						}
339 328
 						$target->ifragment = $relative->ifragment;
340 329
 					}
341
-				}
342
-				else
330
+				} else
343 331
 				{
344 332
 					$target = clone $base;
345 333
 					$target->ifragment = null;
@@ -405,8 +393,7 @@  discard block
 block discarded – undo
405 393
 			if (strpos($input, '../') === 0)
406 394
 			{
407 395
 				$input = substr($input, 3);
408
-			}
409
-			elseif (strpos($input, './') === 0)
396
+			} elseif (strpos($input, './') === 0)
410 397
 			{
411 398
 				$input = substr($input, 2);
412 399
 			}
@@ -414,8 +401,7 @@  discard block
 block discarded – undo
414 401
 			elseif (strpos($input, '/./') === 0)
415 402
 			{
416 403
 				$input = substr($input, 2);
417
-			}
418
-			elseif ($input === '/.')
404
+			} elseif ($input === '/.')
419 405
 			{
420 406
 				$input = '/';
421 407
 			}
@@ -424,8 +410,7 @@  discard block
 block discarded – undo
424 410
 			{
425 411
 				$input = substr($input, 3);
426 412
 				$output = substr_replace($output, '', strrpos($output, '/'));
427
-			}
428
-			elseif ($input === '/..')
413
+			} elseif ($input === '/..')
429 414
 			{
430 415
 				$input = '/';
431 416
 				$output = substr_replace($output, '', strrpos($output, '/'));
@@ -440,8 +425,7 @@  discard block
 block discarded – undo
440 425
 			{
441 426
 				$output .= substr($input, 0, $pos);
442 427
 				$input = substr_replace($input, '', 0, $pos);
443
-			}
444
-			else
428
+			} else
445 429
 			{
446 430
 				$output .= $input;
447 431
 				$input = '';
@@ -535,8 +519,7 @@  discard block
 block discarded – undo
535 519
 							break;
536 520
 						}
537 521
 					}
538
-				}
539
-				else
522
+				} else
540 523
 				{
541 524
 					$position = $strlen - 1;
542 525
 					$valid = false;
@@ -570,8 +553,9 @@  discard block
 block discarded – undo
570 553
 			)
571 554
 			{
572 555
 				// If we were a character, pretend we weren't, but rather an error.
573
-				if ($valid)
574
-					$position--;
556
+				if ($valid) {
557
+									$position--;
558
+				}
575 559
 
576 560
 				for ($j = $start; $j <= $position; $j++)
577 561
 				{
@@ -703,8 +687,7 @@  discard block
 block discarded – undo
703 687
 					{
704 688
 						$string .= '%' . strtoupper($bytes[$j]);
705 689
 					}
706
-				}
707
-				else
690
+				} else
708 691
 				{
709 692
 					for ($j = $start; $j <= $i; $j++)
710 693
 					{
@@ -763,20 +746,28 @@  discard block
 block discarded – undo
763 746
 	 */
764 747
 	public function is_valid()
765 748
 	{
766
-		if ($this->ipath === '') return true;
749
+		if ($this->ipath === '') {
750
+		    return true;
751
+		}
767 752
 
768 753
 		$isauthority = $this->iuserinfo !== null || $this->ihost !== null ||
769 754
 			$this->port !== null;
770
-		if ($isauthority && $this->ipath[0] === '/') return true;
755
+		if ($isauthority && $this->ipath[0] === '/') {
756
+		    return true;
757
+		}
771 758
 
772
-		if (!$isauthority && (substr($this->ipath, 0, 2) === '//')) return false;
759
+		if (!$isauthority && (substr($this->ipath, 0, 2) === '//')) {
760
+		    return false;
761
+		}
773 762
 
774 763
 		// Relative urls cannot have a colon in the first path segment (and the
775 764
 		// slashes themselves are not included so skip the first character).
776 765
 		if (!$this->scheme && !$isauthority &&
777 766
 		    strpos($this->ipath, ':') !== false &&
778 767
 		    strpos($this->ipath, '/', 1) !== false &&
779
-		    strpos($this->ipath, ':') < strpos($this->ipath, '/', 1)) return false;
768
+		    strpos($this->ipath, ':') < strpos($this->ipath, '/', 1)) {
769
+		    return false;
770
+		}
780 771
 
781 772
 		return true;
782 773
 	}
@@ -804,8 +795,7 @@  discard block
 block discarded – undo
804 795
 		if ($iri === null)
805 796
 		{
806 797
 			return true;
807
-		}
808
-		elseif (isset($cache[$iri]))
798
+		} elseif (isset($cache[$iri]))
809 799
 		{
810 800
 			list($this->scheme,
811 801
 				 $this->iuserinfo,
@@ -853,13 +843,11 @@  discard block
 block discarded – undo
853 843
 		if ($scheme === null)
854 844
 		{
855 845
 			$this->scheme = null;
856
-		}
857
-		elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme))
846
+		} elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme))
858 847
 		{
859 848
 			$this->scheme = null;
860 849
 			return false;
861
-		}
862
-		else
850
+		} else
863 851
 		{
864 852
 			$this->scheme = strtolower($scheme);
865 853
 		}
@@ -881,8 +869,9 @@  discard block
 block discarded – undo
881 869
 			$cache = null;
882 870
 			return;
883 871
 		}
884
-		if (!$cache)
885
-			$cache = array();
872
+		if (!$cache) {
873
+					$cache = array();
874
+		}
886 875
 
887 876
 		if ($authority === null)
888 877
 		{
@@ -890,8 +879,7 @@  discard block
 block discarded – undo
890 879
 			$this->ihost = null;
891 880
 			$this->port = null;
892 881
 			return true;
893
-		}
894
-		elseif (isset($cache[$authority]))
882
+		} elseif (isset($cache[$authority]))
895 883
 		{
896 884
 			list($this->iuserinfo,
897 885
 				 $this->ihost,
@@ -906,8 +894,7 @@  discard block
 block discarded – undo
906 894
 		{
907 895
 			$iuserinfo = substr($remaining, 0, $iuserinfo_end);
908 896
 			$remaining = substr($remaining, $iuserinfo_end + 1);
909
-		}
910
-		else
897
+		} else
911 898
 		{
912 899
 			$iuserinfo = null;
913 900
 		}
@@ -918,8 +905,7 @@  discard block
 block discarded – undo
918 905
 				$port = null;
919 906
 			}
920 907
 			$remaining = substr($remaining, 0, $port_start);
921
-		}
922
-		else
908
+		} else
923 909
 		{
924 910
 			$port = null;
925 911
 		}
@@ -947,8 +933,7 @@  discard block
 block discarded – undo
947 933
 		if ($iuserinfo === null)
948 934
 		{
949 935
 			$this->iuserinfo = null;
950
-		}
951
-		else
936
+		} else
952 937
 		{
953 938
 			$this->iuserinfo = $this->replace_invalid_with_pct_encoding($iuserinfo, '!$&\'()*+,;=:');
954 939
 			$this->scheme_normalization();
@@ -970,20 +955,17 @@  discard block
 block discarded – undo
970 955
 		{
971 956
 			$this->ihost = null;
972 957
 			return true;
973
-		}
974
-		elseif (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']')
958
+		} elseif (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']')
975 959
 		{
976 960
 			if (SimplePie_Net_IPv6::check_ipv6(substr($ihost, 1, -1)))
977 961
 			{
978 962
 				$this->ihost = '[' . SimplePie_Net_IPv6::compress(substr($ihost, 1, -1)) . ']';
979
-			}
980
-			else
963
+			} else
981 964
 			{
982 965
 				$this->ihost = null;
983 966
 				return false;
984 967
 			}
985
-		}
986
-		else
968
+		} else
987 969
 		{
988 970
 			$ihost = $this->replace_invalid_with_pct_encoding($ihost, '!$&\'()*+,;=');
989 971
 
@@ -997,8 +979,7 @@  discard block
 block discarded – undo
997 979
 				if ($ihost[$position] === '%')
998 980
 				{
999 981
 					$position += 3;
1000
-				}
1001
-				else
982
+				} else
1002 983
 				{
1003 984
 					$ihost[$position] = strtolower($ihost[$position]);
1004 985
 					$position++;
@@ -1026,8 +1007,7 @@  discard block
 block discarded – undo
1026 1007
 		{
1027 1008
 			$this->port = null;
1028 1009
 			return true;
1029
-		}
1030
-		elseif (strspn($port, '0123456789') === strlen($port))
1010
+		} elseif (strspn($port, '0123456789') === strlen($port))
1031 1011
 		{
1032 1012
 			$this->port = (int) $port;
1033 1013
 			$this->scheme_normalization();
@@ -1062,8 +1042,7 @@  discard block
 block discarded – undo
1062 1042
 		if (isset($cache[$ipath]))
1063 1043
 		{
1064 1044
 			$this->ipath = $cache[$ipath][(int) ($this->scheme !== null)];
1065
-		}
1066
-		else
1045
+		} else
1067 1046
 		{
1068 1047
 			$valid = $this->replace_invalid_with_pct_encoding($ipath, '!$&\'()*+,;=@:/');
1069 1048
 			$removed = $this->remove_dot_segments($valid);
@@ -1087,8 +1066,7 @@  discard block
 block discarded – undo
1087 1066
 		if ($iquery === null)
1088 1067
 		{
1089 1068
 			$this->iquery = null;
1090
-		}
1091
-		else
1069
+		} else
1092 1070
 		{
1093 1071
 			$this->iquery = $this->replace_invalid_with_pct_encoding($iquery, '!$&\'()*+,;=:@/?', true);
1094 1072
 			$this->scheme_normalization();
@@ -1107,8 +1085,7 @@  discard block
 block discarded – undo
1107 1085
 		if ($ifragment === null)
1108 1086
 		{
1109 1087
 			$this->ifragment = null;
1110
-		}
1111
-		else
1088
+		} else
1112 1089
 		{
1113 1090
 			$this->ifragment = $this->replace_invalid_with_pct_encoding($ifragment, '!$&\'()*+,;=:@/?');
1114 1091
 			$this->scheme_normalization();
@@ -1165,8 +1142,7 @@  discard block
 block discarded – undo
1165 1142
 		if ($this->ipath !== '')
1166 1143
 		{
1167 1144
 			$iri .= $this->ipath;
1168
-		}
1169
-        elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '')
1145
+		} elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '')
1170 1146
 		{
1171 1147
 			$iri .= $this->normalization[$this->scheme]['ipath'];
1172 1148
 		}
@@ -1228,8 +1204,9 @@  discard block
 block discarded – undo
1228 1204
 	protected function get_authority()
1229 1205
 	{
1230 1206
 		$iauthority = $this->get_iauthority();
1231
-		if (is_string($iauthority))
1232
-			return $this->to_uri($iauthority);
1207
+		if (is_string($iauthority)) {
1208
+					return $this->to_uri($iauthority);
1209
+		}
1233 1210
 
1234 1211
 		return $iauthority;
1235 1212
 	}
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/Cache/MySQL.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
 		try
106 106
 		{
107 107
 			$this->mysql = new PDO("mysql:dbname={$this->options['dbname']};host={$this->options['host']};port={$this->options['port']}", $this->options['user'], $this->options['pass'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
108
-		}
109
-		catch (PDOException $e)
108
+		} catch (PDOException $e)
110 109
 		{
111 110
 			$this->mysql = null;
112 111
 			return;
@@ -191,8 +190,7 @@  discard block
 block discarded – undo
191 190
 						$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed';
192 191
 						$query = $this->mysql->prepare($sql);
193 192
 						$query->bindValue(':items', $items);
194
-					}
195
-					else
193
+					} else
196 194
 					{
197 195
 						$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `data` = :data, `mtime` = :time WHERE `id` = :feed';
198 196
 						$query = $this->mysql->prepare($sql);
@@ -205,8 +203,7 @@  discard block
 block discarded – undo
205 203
 					{
206 204
 						return false;
207 205
 					}
208
-				}
209
-				else
206
+				} else
210 207
 				{
211 208
 					$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:feed, :count, :data, :time)');
212 209
 					$query->bindValue(':feed', $this->id);
@@ -259,14 +256,12 @@  discard block
 block discarded – undo
259 256
 						}
260 257
 						return true;
261 258
 					}
262
-				}
263
-				else
259
+				} else
264 260
 				{
265 261
 					return true;
266 262
 				}
267 263
 			}
268
-		}
269
-		else
264
+		} else
270 265
 		{
271 266
 			$query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
272 267
 			$query->bindValue(':feed', $this->id);
@@ -282,8 +277,7 @@  discard block
 block discarded – undo
282 277
 					{
283 278
 						return true;
284 279
 					}
285
-				}
286
-				else
280
+				} else
287 281
 				{
288 282
 					$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:id, 0, :data, :time)');
289 283
 					$query->bindValue(':id', $this->id);
@@ -320,8 +314,7 @@  discard block
 block discarded – undo
320 314
 			if (isset($this->options['items'][0]))
321 315
 			{
322 316
 				$items = (int) $this->options['items'][0];
323
-			}
324
-			else
317
+			} else
325 318
 			{
326 319
 				$items = (int) $row[0];
327 320
 			}
@@ -331,20 +324,16 @@  discard block
 block discarded – undo
331 324
 				if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
332 325
 				{
333 326
 					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
334
-				}
335
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
327
+				} elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
336 328
 				{
337 329
 					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
338
-				}
339
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
330
+				} elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
340 331
 				{
341 332
 					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
342
-				}
343
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]))
333
+				} elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]))
344 334
 				{
345 335
 					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0];
346
-				}
347
-				else
336
+				} else
348 337
 				{
349 338
 					$feed = null;
350 339
 				}
@@ -365,8 +354,7 @@  discard block
 block discarded – undo
365 354
 						{
366 355
 							$feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row);
367 356
 						}
368
-					}
369
-					else
357
+					} else
370 358
 					{
371 359
 						return false;
372 360
 					}
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/Cache/DB.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,20 +81,16 @@
 block discarded – undo
81 81
 			if (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
82 82
 			{
83 83
 				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
84
-			}
85
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
84
+			} elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
86 85
 			{
87 86
 				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
88
-			}
89
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
87
+			} elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
90 88
 			{
91 89
 				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
92
-			}
93
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]))
90
+			} elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]))
94 91
 			{
95 92
 				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0];
96
-			}
97
-			else
93
+			} else
98 94
 			{
99 95
 				$channel = null;
100 96
 			}
Please login to merge, or discard this patch.
wp/wp-includes/SimplePie/Misc.php 1 patch
Braces   +23 added lines, -46 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@  discard block
 block discarded – undo
108 108
 				if (strlen($matches[$i][3][0]) <= 2)
109 109
 				{
110 110
 					$return[$i]['self_closing'] = true;
111
-				}
112
-				else
111
+				} else
113 112
 				{
114 113
 					$return[$i]['self_closing'] = false;
115 114
 					$return[$i]['content'] = $matches[$i][4][0];
@@ -142,8 +141,7 @@  discard block
 block discarded – undo
142 141
 		if ($element['self_closing'])
143 142
 		{
144 143
 			$full .= ' />';
145
-		}
146
-		else
144
+		} else
147 145
 		{
148 146
 			$full .= ">$element[content]</$element[tag]>";
149 147
 		}
@@ -208,12 +206,10 @@  discard block
 block discarded – undo
208 206
 		if ($http === 2 && $parsed['scheme'] !== '')
209 207
 		{
210 208
 			return "feed:$url";
211
-		}
212
-		elseif ($http === 3 && strtolower($parsed['scheme']) === 'http')
209
+		} elseif ($http === 3 && strtolower($parsed['scheme']) === 'http')
213 210
 		{
214 211
 			return substr_replace($url, 'podcast', 0, 4);
215
-		}
216
-		elseif ($http === 4 && strtolower($parsed['scheme']) === 'http')
212
+		} elseif ($http === 4 && strtolower($parsed['scheme']) === 'http')
217 213
 		{
218 214
 			return substr_replace($url, 'itpc', 0, 4);
219 215
 		}
@@ -228,8 +224,7 @@  discard block
 block discarded – undo
228 224
 			if (is_array($value))
229 225
 			{
230 226
 				$array1[$key] = SimplePie_Misc::array_merge_recursive($array1[$key], $value);
231
-			}
232
-			else
227
+			} else
233 228
 			{
234 229
 				$array1[$key] = $value;
235 230
 			}
@@ -1728,16 +1723,13 @@  discard block
 block discarded – undo
1728 1723
 		if (is_array($curl = curl_version()))
1729 1724
 		{
1730 1725
 			$curl = $curl['version'];
1731
-		}
1732
-		elseif (substr($curl, 0, 5) === 'curl/')
1726
+		} elseif (substr($curl, 0, 5) === 'curl/')
1733 1727
 		{
1734 1728
 			$curl = substr($curl, 5, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 5));
1735
-		}
1736
-		elseif (substr($curl, 0, 8) === 'libcurl/')
1729
+		} elseif (substr($curl, 0, 8) === 'libcurl/')
1737 1730
 		{
1738 1731
 			$curl = substr($curl, 8, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 8));
1739
-		}
1740
-		else
1732
+		} else
1741 1733
 		{
1742 1734
 			$curl = 0;
1743 1735
 		}
@@ -1759,8 +1751,7 @@  discard block
 block discarded – undo
1759 1751
 			if (($end = strpos($data, '-->', $start)) !== false)
1760 1752
 			{
1761 1753
 				$data = substr_replace($data, '', 0, $end + 3);
1762
-			}
1763
-			else
1754
+			} else
1764 1755
 			{
1765 1756
 				$data = '';
1766 1757
 			}
@@ -1816,8 +1807,7 @@  discard block
 block discarded – undo
1816 1807
 					{
1817 1808
 						$position++;
1818 1809
 						continue;
1819
-					}
1820
-					elseif (isset($string[$position]))
1810
+					} elseif (isset($string[$position]))
1821 1811
 					{
1822 1812
 						switch ($string[$position])
1823 1813
 						{
@@ -1830,14 +1820,12 @@  discard block
 block discarded – undo
1830 1820
 								break;
1831 1821
 						}
1832 1822
 						$position++;
1833
-					}
1834
-					else
1823
+					} else
1835 1824
 					{
1836 1825
 						break;
1837 1826
 					}
1838 1827
 				}
1839
-			}
1840
-			else
1828
+			} else
1841 1829
 			{
1842 1830
 				$output .= '(';
1843 1831
 			}
@@ -1862,8 +1850,7 @@  discard block
 block discarded – undo
1862 1850
 		if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
1863 1851
 		{
1864 1852
 			$mode = SIMPLEPIE_CONSTRUCT_BASE64;
1865
-		}
1866
-		else
1853
+		} else
1867 1854
 		{
1868 1855
 			$mode = SIMPLEPIE_CONSTRUCT_NONE;
1869 1856
 		}
@@ -1932,8 +1919,7 @@  discard block
 block discarded – undo
1932 1919
 			if (in_array(substr($type, -4), array('+xml', '/xml')) || substr($type, 0, 5) === 'text/')
1933 1920
 			{
1934 1921
 				return SIMPLEPIE_CONSTRUCT_NONE;
1935
-			}
1936
-			else
1922
+			} else
1937 1923
 			{
1938 1924
 				return SIMPLEPIE_CONSTRUCT_BASE64;
1939 1925
 			}
@@ -1979,20 +1965,16 @@  discard block
 block discarded – undo
1979 1965
 		if ($codepoint < 0)
1980 1966
 		{
1981 1967
 			return false;
1982
-		}
1983
-		else if ($codepoint <= 0x7f)
1968
+		} else if ($codepoint <= 0x7f)
1984 1969
 		{
1985 1970
 			return chr($codepoint);
1986
-		}
1987
-		else if ($codepoint <= 0x7ff)
1971
+		} else if ($codepoint <= 0x7ff)
1988 1972
 		{
1989 1973
 			return chr(0xc0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3f));
1990
-		}
1991
-		else if ($codepoint <= 0xffff)
1974
+		} else if ($codepoint <= 0xffff)
1992 1975
 		{
1993 1976
 			return chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f));
1994
-		}
1995
-		else if ($codepoint <= 0x10ffff)
1977
+		} else if ($codepoint <= 0x10ffff)
1996 1978
 		{
1997 1979
 			return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f));
1998 1980
 		}
@@ -2022,8 +2004,7 @@  discard block
 block discarded – undo
2022 2004
 			{
2023 2005
 				list($name, $value) = explode('=', $section, 2);
2024 2006
 				$return[urldecode($name)][] = urldecode($value);
2025
-			}
2026
-			else
2007
+			} else
2027 2008
 			{
2028 2009
 				$return[urldecode($section)][] = null;
2029 2010
 			}
@@ -2185,8 +2166,7 @@  discard block
 block discarded – undo
2185 2166
 		if (file_exists($root . '/.git/index'))
2186 2167
 		{
2187 2168
 			return filemtime($root . '/.git/index');
2188
-		}
2189
-		elseif (file_exists($root . '/SimplePie'))
2169
+		} elseif (file_exists($root . '/SimplePie'))
2190 2170
 		{
2191 2171
 			$time = 0;
2192 2172
 			foreach (glob($root . '/SimplePie/*.php') as $file)
@@ -2197,8 +2177,7 @@  discard block
 block discarded – undo
2197 2177
 				}
2198 2178
 			}
2199 2179
 			return $time;
2200
-		}
2201
-		elseif (file_exists(dirname(__FILE__) . '/Core.php'))
2180
+		} elseif (file_exists(dirname(__FILE__) . '/Core.php'))
2202 2181
 		{
2203 2182
 			return filemtime(dirname(__FILE__) . '/Core.php');
2204 2183
 		}
@@ -2216,8 +2195,7 @@  discard block
 block discarded – undo
2216 2195
 		if ($sp->error() !== null)
2217 2196
 		{
2218 2197
 			$info .= 'Error occurred: ' . $sp->error() . "\n";
2219
-		}
2220
-		else
2198
+		} else
2221 2199
 		{
2222 2200
 			$info .= "No error found.\n";
2223 2201
 		}
@@ -2247,8 +2225,7 @@  discard block
 block discarded – undo
2247 2225
 						$info .= '      Version ' . LIBXML_DOTTED_VERSION . "\n";
2248 2226
 						break;
2249 2227
 				}
2250
-			}
2251
-			else
2228
+			} else
2252 2229
 			{
2253 2230
 				$info .= "    $ext not loaded\n";
2254 2231
 			}
Please login to merge, or discard this patch.