This commit is contained in:
wangjinlei
2024-12-31 10:28:40 +08:00
parent 145b0ab8a5
commit a54a837670
1179 changed files with 2686 additions and 230376 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Psr\Http\Message;
/**
@@ -39,7 +41,7 @@ interface RequestInterface extends MessageInterface
*
* @return string
*/
public function getRequestTarget(): string;
public function getRequestTarget();
/**
* Return an instance with the specific request-target.
@@ -58,15 +60,14 @@ interface RequestInterface extends MessageInterface
* @param string $requestTarget
* @return static
*/
public function withRequestTarget(string $requestTarget): RequestInterface;
public function withRequestTarget(string $requestTarget);
/**
* Retrieves the HTTP method of the request.
*
* @return string Returns the request method.
*/
public function getMethod(): string;
public function getMethod();
/**
* Return an instance with the provided HTTP method.
@@ -83,7 +84,7 @@ interface RequestInterface extends MessageInterface
* @return static
* @throws \InvalidArgumentException for invalid HTTP methods.
*/
public function withMethod(string $method): RequestInterface;
public function withMethod(string $method);
/**
* Retrieves the URI instance.
@@ -94,7 +95,7 @@ interface RequestInterface extends MessageInterface
* @return UriInterface Returns a UriInterface instance
* representing the URI of the request.
*/
public function getUri(): UriInterface;
public function getUri();
/**
* Returns an instance with the provided URI.
@@ -126,5 +127,5 @@ interface RequestInterface extends MessageInterface
* @param bool $preserveHost Preserve the original state of the Host header.
* @return static
*/
public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface;
public function withUri(UriInterface $uri, bool $preserveHost = false);
}