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:
parent
b70436373b
commit
d2d4f993e1
8 changed files with 15 additions and 15 deletions
application
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue