改名
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace Protocol\Message;
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Kiri\Core\Xml;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
|
||||
@@ -20,7 +19,7 @@ trait Message
|
||||
|
||||
|
||||
/**
|
||||
* @var \Psr\Http\Message\StreamInterface
|
||||
* @var StreamInterface
|
||||
*/
|
||||
protected StreamInterface $stream;
|
||||
|
||||
@@ -193,7 +192,6 @@ trait Message
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ abstract class Request implements RequestInterface
|
||||
|
||||
|
||||
/**
|
||||
* @var \Psr\Http\Message\UriInterface
|
||||
* @var UriInterface
|
||||
*/
|
||||
protected UriInterface $uriInterface;
|
||||
|
||||
@@ -30,15 +30,15 @@ abstract class Request implements RequestInterface
|
||||
|
||||
|
||||
/**
|
||||
* @var \Http\IInterface\AuthIdentity
|
||||
* @var AuthIdentity|null
|
||||
*/
|
||||
public AuthIdentity $authority;
|
||||
public ?AuthIdentity $authority = null;
|
||||
|
||||
|
||||
/**
|
||||
* @param \Http\IInterface\AuthIdentity $authIdentity
|
||||
* @param AuthIdentity|null $authIdentity
|
||||
*/
|
||||
public function setAuthority(AuthIdentity $authIdentity): void
|
||||
public function setAuthority(?AuthIdentity $authIdentity): void
|
||||
{
|
||||
$this->authority = $authIdentity;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Response implements ResponseInterface
|
||||
/**
|
||||
* @param int $code
|
||||
* @param string $reasonPhrase
|
||||
* @return $this|\Protocol\Message\Response
|
||||
* @return $this|Response
|
||||
*/
|
||||
public function withStatus($code, $reasonPhrase = ''): static
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param string $scheme
|
||||
* @return $this|\Protocol\Message\Uri
|
||||
* @return $this|Uri
|
||||
*/
|
||||
public function withScheme($scheme): UriInterface
|
||||
{
|
||||
@@ -104,7 +104,7 @@ class Uri implements UriInterface
|
||||
/**
|
||||
* @param string $user
|
||||
* @param null $password
|
||||
* @return \Protocol\Message\Uri
|
||||
* @return Uri
|
||||
*/
|
||||
public function withUserInfo($user, $password = null): UriInterface
|
||||
{
|
||||
@@ -114,7 +114,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param string $host
|
||||
* @return $this|\Protocol\Message\Uri
|
||||
* @return $this|Uri
|
||||
*/
|
||||
public function withHost($host): UriInterface
|
||||
{
|
||||
@@ -125,7 +125,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param int|null $port
|
||||
* @return $this|\Protocol\Message\Uri
|
||||
* @return $this|Uri
|
||||
*/
|
||||
public function withPort($port): UriInterface
|
||||
{
|
||||
@@ -136,7 +136,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @return $this|\Protocol\Message\Uri
|
||||
* @return $this|Uri
|
||||
*/
|
||||
public function withPath($path): UriInterface
|
||||
{
|
||||
@@ -147,7 +147,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @return $this|\Protocol\Message\Uri
|
||||
* @return $this|Uri
|
||||
*/
|
||||
public function withQuery($query): UriInterface
|
||||
{
|
||||
@@ -158,7 +158,7 @@ class Uri implements UriInterface
|
||||
|
||||
/**
|
||||
* @param string $fragment
|
||||
* @return \Protocol\Message\Uri
|
||||
* @return Uri
|
||||
*/
|
||||
public function withFragment($fragment): UriInterface
|
||||
{
|
||||
@@ -193,7 +193,7 @@ class Uri implements UriInterface
|
||||
|
||||
|
||||
/**
|
||||
* @param \Swoole\Http\Request $request
|
||||
* @param Request $request
|
||||
* @return UriInterface
|
||||
*/
|
||||
public static function parseUri(Request $request): UriInterface
|
||||
|
||||
Reference in New Issue
Block a user