Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'else if' with 'elseif' #4293

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/IXR/class-IXR-server.php
Expand Up @@ -113,7 +113,7 @@ function call($methodname, $args)
if (!is_callable(array($method[0], $method[1]))) {
return new IXR_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.');
}
} else if (!function_exists($method)) {
} elseif (!function_exists($method)) {
return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
}

Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/SimplePie/File.php
Expand Up @@ -257,11 +257,11 @@ public function __construct($url, $timeout = 10, $redirects = 5, $headers = null
{
$this->body = $decompressed;
}
else if (($decompressed = gzuncompress($this->body)) !== false)
elseif (($decompressed = gzuncompress($this->body)) !== false)
{
$this->body = $decompressed;
}
else if (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false)
elseif (function_exists('gzdecode') && ($decompressed = gzdecode($this->body)) !== false)
{
$this->body = $decompressed;
}
Expand Down
8 changes: 4 additions & 4 deletions src/wp-includes/SimplePie/Misc.php
Expand Up @@ -1980,19 +1980,19 @@ public static function codepoint_to_utf8($codepoint)
{
return false;
}
else if ($codepoint <= 0x7f)
elseif ($codepoint <= 0x7f)
{
return chr($codepoint);
}
else if ($codepoint <= 0x7ff)
elseif ($codepoint <= 0x7ff)
{
return chr(0xc0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3f));
}
else if ($codepoint <= 0xffff)
elseif ($codepoint <= 0xffff)
{
return chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f));
}
else if ($codepoint <= 0x10ffff)
elseif ($codepoint <= 0x10ffff)
{
return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f));
}
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/SimplePie/Net/IPv6.php
Expand Up @@ -108,13 +108,13 @@ public static function uncompress($ip)
$ip = '0:0:0:0:0:0:0:0';
}
// ::xxx
else if ($c1 === -1)
elseif ($c1 === -1)
{
$fill = str_repeat('0:', 7 - $c2);
$ip = str_replace('::', $fill, $ip);
}
// xxx::
else if ($c2 === -1)
elseif ($c2 === -1)
{
$fill = str_repeat(':0', 7 - $c1);
$ip = str_replace('::', $fill, $ip);
Expand Down
12 changes: 6 additions & 6 deletions src/wp-includes/SimplePie/Parser.php
Expand Up @@ -479,7 +479,7 @@ private function parse_microformats(&$data, $url) {
if (in_array('h-card', $mf_item['type'])) $feed_author = $mf_item;
break;
}
else if (in_array('h-entry', $mf_item['children'][0]['type'])) {
elseif (in_array('h-entry', $mf_item['children'][0]['type'])) {
$entries = $mf_item['children'];
// In this case the parent of the h-entry list may be an h-card, so use
// it as the feed_author.
Expand All @@ -497,7 +497,7 @@ private function parse_microformats(&$data, $url) {
$feed_author = $mf['items'][0]['properties']['author'][0];
}
}
else if (count($entries) === 0) {
elseif (count($entries) === 0) {
$entries = $mf['items'];
}
for ($i = 0; $i < count($entries); $i++) {
Expand Down Expand Up @@ -530,7 +530,7 @@ private function parse_microformats(&$data, $url) {
if (!is_string($author)) {
$author = $this->parse_hcard($author);
}
else if (strpos($author, 'http') === 0) {
elseif (strpos($author, 'http') === 0) {
if (isset($author_cache[$author])) {
$author = $author_cache[$author];
}
Expand Down Expand Up @@ -585,7 +585,7 @@ private function parse_microformats(&$data, $url) {
}
$description .= '<br><b>'.$count.' photos</b></p>';
}
else if ($count == 1) {
elseif ($count == 1) {
$description = '<p><img src="'.$photo_list[0].'"></p>';
}
}
Expand All @@ -603,7 +603,7 @@ private function parse_microformats(&$data, $url) {
if (is_string($entry['properties']['in-reply-to'][0])) {
$in_reply_to = $entry['properties']['in-reply-to'][0];
}
else if (isset($entry['properties']['in-reply-to'][0]['value'])) {
elseif (isset($entry['properties']['in-reply-to'][0]['value'])) {
$in_reply_to = $entry['properties']['in-reply-to'][0]['value'];
}
if ($in_reply_to !== '') {
Expand Down Expand Up @@ -654,7 +654,7 @@ private function parse_microformats(&$data, $url) {
if ($feed_title !== '') {
$feed_title = array(array('data' => htmlspecialchars($feed_title)));
}
else if ($position = strpos($data, '<title>')) {
elseif ($position = strpos($data, '<title>')) {
$start = $position < 200 ? 0 : $position - 200;
$check = substr($data, $start, 400);
$matches = array();
Expand Down
8 changes: 4 additions & 4 deletions src/wp-includes/atomlib.php
Expand Up @@ -248,7 +248,7 @@ function start_element($parser, $name, $attrs) {

array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">"));

} else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
} elseif(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
$this->in_content = array();
$this->is_xhtml = $attrs['type'] == 'xhtml';
$this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html';
Expand All @@ -260,9 +260,9 @@ function start_element($parser, $name, $attrs) {
} else {
array_push($this->in_content, array($tag,$this->depth, $type));
}
} else if($tag == 'link') {
} elseif($tag == 'link') {
array_push($this->current->links, $attrs);
} else if($tag == 'category') {
} elseif($tag == 'category') {
array_push($this->current->categories, $attrs);
}

Expand Down Expand Up @@ -302,7 +302,7 @@ function end_element($parser, $name) {
$this->current->$tag = join('',$newcontent);
}
$this->in_content = array();
} else if($this->in_content[$ccount-1][0] == $tag &&
} elseif($this->in_content[$ccount-1][0] == $tag &&
$this->in_content[$ccount-1][1] == $this->depth) {
$this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>";
} else {
Expand Down