simplify with ternary shortcut.
This commit is contained in:
parent
a216af62dc
commit
0e66517ec9
|
@ -96,7 +96,7 @@ protected static function format($uri)
|
|||
$uri = static::remove($uri, $index);
|
||||
}
|
||||
|
||||
return (($uri = trim($uri, '/')) !== '') ? $uri : '/';
|
||||
return trim($uri, '/') ?: '/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue