diff --git a/Message/Http/Request.php b/Message/Http/Request.php index a451bcc37..70b48507a 100644 --- a/Message/Http/Request.php +++ b/Message/Http/Request.php @@ -83,7 +83,7 @@ class Request extends RequestAbstract * @since 1.0.0 * @author Dennis Eichhorn */ - public function __construct(UriInterface $uri) + public function __construct(UriInterface $uri = null) { $this->uri = $uri; $this->l11n = new Localization(); @@ -149,7 +149,7 @@ class Request extends RequestAbstract } } - $this->uri->set(Http::getCurrent()); + $this->uri = $this->uri ?? new Http(Http::getCurrent()); } /** diff --git a/Uri/UriInterface.php b/Uri/UriInterface.php index 8c21be327..f14e944d5 100644 --- a/Uri/UriInterface.php +++ b/Uri/UriInterface.php @@ -41,16 +41,6 @@ interface UriInterface */ public static function isValid(string $uri) : bool; - /** - * Set uri - * - * @param string $uri Uri string - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function set(string $uri); - /** * Get scheme. *