simplify with ternary shortcut.

This commit is contained in:
Taylor Otwell 2012-02-08 14:35:30 -06:00
parent a216af62dc
commit 0e66517ec9
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ protected static function format($uri)
$uri = static::remove($uri, $index);
}
return (($uri = trim($uri, '/')) !== '') ? $uri : '/';
return trim($uri, '/') ?: '/';
}
/**