PSR: use elseif instead of else if

See https://www.php-fig.org/psr/psr-2/\#51-if-elseif-else
This commit is contained in:
ArthurHoaro 2018-02-28 22:34:40 +01:00
parent b70436373b
commit d2d4f993e1
8 changed files with 15 additions and 15 deletions
application

View file

@ -81,7 +81,7 @@ function whitelist_protocols($url, $protocols)
// Protocol not allowed: we remove it and replace it with http
if ($protocol === 1 && ! in_array($match[1], $protocols)) {
$url = str_replace($match[0], 'http://', $url);
} else if ($protocol !== 1) {
} elseif ($protocol !== 1) {
$url = 'http://' . $url;
}
return $url;