Skip to content

Commit

Permalink
Update UrlGenerator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pilot911 authored Dec 10, 2016
1 parent 167e83b commit f72ac7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Routing/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function previous($fallback = false)

if ($url) {
return $url;
} else if ($fallback) {
} elseif ($fallback) {
return $this->to($fallback);
} else {
return $this->to('/');
Expand Down Expand Up @@ -443,7 +443,7 @@ protected function replaceNamedParameters($path, &$parameters)
return preg_replace_callback('/\{(.*?)\??\}/', function ($m) use (&$parameters, $defaultNamedParameters) {
if (isset($parameters[$m[1]])) {
return Arr::pull($parameters, $m[1]);
} else if (isset($defaultNamedParameters[$m[1]])) {
} elseif (isset($defaultNamedParameters[$m[1]])) {
return $defaultNamedParameters[$m[1]];
} else {
return $m[0];
Expand Down

0 comments on commit f72ac7f

Please sign in to comment.