This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function getHeaders()
4343 {
4444 $ headers = $ this ->headers ;
4545 if (! $ this ->hasHeader ('host ' )
46- && ( $ this ->uri && $ this -> uri -> getHost () )
46+ && $ this ->uri -> getHost ()
4747 ) {
4848 $ headers ['Host ' ] = [$ this ->getHostFromUri ()];
4949 }
@@ -58,7 +58,7 @@ public function getHeader($header)
5858 {
5959 if (! $ this ->hasHeader ($ header )) {
6060 if (strtolower ($ header ) === 'host '
61- && ( $ this ->uri && $ this -> uri -> getHost () )
61+ && $ this ->uri -> getHost ()
6262 ) {
6363 return [$ this ->getHostFromUri ()];
6464 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ trait RequestTrait
4343 private $ requestTarget ;
4444
4545 /**
46- * @var null| UriInterface
46+ * @var UriInterface
4747 */
4848 private $ uri ;
4949
@@ -132,10 +132,6 @@ public function getRequestTarget()
132132 return $ this ->requestTarget ;
133133 }
134134
135- if (! $ this ->uri ) {
136- return '/ ' ;
137- }
138-
139135 $ target = $ this ->uri ->getPath ();
140136 if ($ this ->uri ->getQuery ()) {
141137 $ target .= '? ' . $ this ->uri ->getQuery ();
You can’t perform that action at this time.
0 commit comments