强制提交

This commit is contained in:
wyn
2026-06-29 10:36:38 +08:00
147 changed files with 2437 additions and 886 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Psr\Http\Message;
/**
@@ -23,7 +25,7 @@ interface MessageInterface
*
* @return string HTTP protocol version.
*/
public function getProtocolVersion(): string;
public function getProtocolVersion();
/**
* Return an instance with the specified HTTP protocol version.
@@ -38,7 +40,7 @@ interface MessageInterface
* @param string $version HTTP protocol version
* @return static
*/
public function withProtocolVersion(string $version): MessageInterface;
public function withProtocolVersion(string $version);
/**
* Retrieves all message header values.
@@ -65,7 +67,7 @@ interface MessageInterface
* key MUST be a header name, and each value MUST be an array of strings
* for that header.
*/
public function getHeaders(): array;
public function getHeaders();
/**
* Checks if a header exists by the given case-insensitive name.
@@ -75,7 +77,7 @@ interface MessageInterface
* name using a case-insensitive string comparison. Returns false if
* no matching header name is found in the message.
*/
public function hasHeader(string $name): bool;
public function hasHeader(string $name);
/**
* Retrieves a message header value by the given case-insensitive name.
@@ -91,7 +93,7 @@ interface MessageInterface
* header. If the header does not appear in the message, this method MUST
* return an empty array.
*/
public function getHeader(string $name): array;
public function getHeader(string $name);
/**
* Retrieves a comma-separated string of the values for a single header.
@@ -112,7 +114,7 @@ interface MessageInterface
* concatenated together using a comma. If the header does not appear in
* the message, this method MUST return an empty string.
*/
public function getHeaderLine(string $name): string;
public function getHeaderLine(string $name);
/**
* Return an instance with the provided value replacing the specified header.
@@ -129,7 +131,7 @@ interface MessageInterface
* @return static
* @throws \InvalidArgumentException for invalid header names or values.
*/
public function withHeader(string $name, $value): MessageInterface;
public function withHeader(string $name, $value);
/**
* Return an instance with the specified header appended with the given value.
@@ -147,7 +149,7 @@ interface MessageInterface
* @return static
* @throws \InvalidArgumentException for invalid header names or values.
*/
public function withAddedHeader(string $name, $value): MessageInterface;
public function withAddedHeader(string $name, $value);
/**
* Return an instance without the specified header.
@@ -161,14 +163,14 @@ interface MessageInterface
* @param string $name Case-insensitive header field name to remove.
* @return static
*/
public function withoutHeader(string $name): MessageInterface;
public function withoutHeader(string $name);
/**
* Gets the body of the message.
*
* @return StreamInterface Returns the body as a stream.
*/
public function getBody(): StreamInterface;
public function getBody();
/**
* Return an instance with the specified message body.
@@ -183,5 +185,5 @@ interface MessageInterface
* @return static
* @throws \InvalidArgumentException When the body is not valid.
*/
public function withBody(StreamInterface $body): MessageInterface;
public function withBody(StreamInterface $body);
}

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Psr\Http\Message;
/**
@@ -28,7 +30,7 @@ interface UploadedFileInterface
* @throws \RuntimeException in cases when no stream is available or can be
* created.
*/
public function getStream(): StreamInterface;
public function getStream();
/**
* Move the uploaded file to a new location.
@@ -62,7 +64,7 @@ interface UploadedFileInterface
* @throws \RuntimeException on any error during the move operation, or on
* the second or subsequent call to the method.
*/
public function moveTo(string $targetPath): void;
public function moveTo(string $targetPath);
/**
* Retrieve the file size.
@@ -73,7 +75,7 @@ interface UploadedFileInterface
*
* @return int|null The file size in bytes or null if unknown.
*/
public function getSize(): ?int;
public function getSize();
/**
* Retrieve the error associated with the uploaded file.
@@ -89,7 +91,7 @@ interface UploadedFileInterface
* @see http://php.net/manual/en/features.file-upload.errors.php
* @return int One of PHP's UPLOAD_ERR_XXX constants.
*/
public function getError(): int;
public function getError();
/**
* Retrieve the filename sent by the client.
@@ -104,7 +106,7 @@ interface UploadedFileInterface
* @return string|null The filename sent by the client or null if none
* was provided.
*/
public function getClientFilename(): ?string;
public function getClientFilename();
/**
* Retrieve the media type sent by the client.
@@ -119,5 +121,5 @@ interface UploadedFileInterface
* @return string|null The media type sent by the client or null if none
* was provided.
*/
public function getClientMediaType(): ?string;
public function getClientMediaType();
}