From bf50b67475dbf5091850b1bc84ae061f7741c65e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 24 Oct 2011 23:39:27 -0500 Subject: [PATCH] refactoring the uri class. --- laravel/uri.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/laravel/uri.php b/laravel/uri.php index c5a135e6..9c904f86 100644 --- a/laravel/uri.php +++ b/laravel/uri.php @@ -34,14 +34,9 @@ class URI { */ public function get() { - if (is_null($this->uri)) - { - $uri = parse_url($this->server['REQUEST_URI'], PHP_URL_PATH); + if ( ! is_null($this->uri)) return $this->uri; - $this->uri = $this->format($this->clean($uri)); - } - - return $this->uri; + return $this->uri = $this->format($this->clean(parse_url($this->server['REQUEST_URI'], PHP_URL_PATH))); } /**