diff --git a/src/Request.php b/src/Request.php index fbf6e00..9885ea8 100644 --- a/src/Request.php +++ b/src/Request.php @@ -13,11 +13,15 @@ final class Request implements RequestInterface use RequestTrait; /** - * @param string $method - * @param UriInterface|string $uri - * @param array $headers - * @param StreamInterface|string|resource|null $body - * @param string $protocol + * @param string $method The HTTP method. + * @param UriInterface|string $uri The URI to request. + * @param array $headers The headers to send with the request. + * @param StreamInterface|string|resource|null $body The body of the request. Must be one of the following: + * - an instance of `StreamInterface`; + * - a string stream identifier (e.g., 'php://temp') or a file path; + * - a valid stream resource; + * - `null`. + * @param string $protocol The HTTP protocol version. */ public function __construct( string $method = 'GET', diff --git a/src/Response.php b/src/Response.php index 6b4787c..1fb6131 100644 --- a/src/Response.php +++ b/src/Response.php @@ -12,11 +12,15 @@ final class Response implements ResponseInterface use ResponseTrait; /** - * @param int $statusCode - * @param array $headers - * @param StreamInterface|string|resource|null $body - * @param string $protocol - * @param string $reasonPhrase + * @param int $statusCode The HTTP status code. + * @param array $headers The headers to send with the response. + * @param StreamInterface|string|resource|null $body The body of the response. Must be one of the following: + * - an instance of `StreamInterface`; + * - a string stream identifier (e.g., 'php://temp') or a file path; + * - a valid stream resource; + * - `null`. + * @param string $protocol The HTTP protocol version. + * @param string $reasonPhrase The reason phrase associated with the status code. */ public function __construct( int $statusCode = 200, diff --git a/src/ServerRequest.php b/src/ServerRequest.php index c2706e4..7ee8776 100644 --- a/src/ServerRequest.php +++ b/src/ServerRequest.php @@ -52,16 +52,21 @@ final class ServerRequest implements ServerRequestInterface private array $uploadedFiles; /** - * @param array $serverParams - * @param array $uploadedFiles - * @param array $cookieParams - * @param array $queryParams - * @param array|object|null $parsedBody - * @param string $method - * @param UriInterface|string $uri - * @param array $headers - * @param StreamInterface|string|resource|null $body - * @param string $protocol + * @param array $serverParams The server parameters. + * @param array $uploadedFiles The array of uploaded files, each being an instance of `UploadedFileInterface`. + * Nested arrays are allowed. + * @param array $cookieParams The cookie parameters. + * @param array $queryParams The query parameters. + * @param array|object|null $parsedBody The parsed body. + * @param string $method The HTTP method. + * @param UriInterface|string $uri The URI to request. + * @param array $headers The headers to send with the request. + * @param StreamInterface|string|resource|null $body The body of the request. Must be one of the following: + * - an instance of `StreamInterface`; + * - a string stream identifier (e.g., 'php://temp') or a file path; + * - a valid stream resource; + * - `null`. + * @param string $protocol The HTTP protocol version. */ public function __construct( array $serverParams = [], diff --git a/src/Stream.php b/src/Stream.php index 56415af..a074d17 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -11,8 +11,10 @@ final class Stream implements StreamInterface use StreamTrait; /** - * @param string|resource $stream - * @param string $mode + * @param string|resource $stream The stream to use. Must be one of the following: + * - a string stream identifier (e.g., 'php://temp') or a file path; + * - a valid stream resource. + * @param string $mode The mode in which to open the stream. */ public function __construct($stream = 'php://temp', string $mode = 'wb+') { diff --git a/src/UploadedFile.php b/src/UploadedFile.php index 0624179..fe07638 100644 --- a/src/UploadedFile.php +++ b/src/UploadedFile.php @@ -92,11 +92,14 @@ final class UploadedFile implements UploadedFileInterface private bool $isMoved = false; /** - * @param StreamInterface|string|resource $streamOrFile - * @param int $size - * @param int $error - * @param string|null $clientFilename - * @param string|null $clientMediaType + * @param StreamInterface|string|resource $streamOrFile The file to upload. Must be one of the following: + * - an instance of `StreamInterface`; + * - a string stream identifier (e.g., 'php://temp') or a file path; + * - a valid stream resource. + * @param int $size The size of the uploaded file. + * @param int $error The error code. + * @param string|null $clientFilename Client filename. + * @param string|null $clientMediaType Client media type. * @psalm-suppress DocblockTypeContradiction * @psalm-suppress RedundantConditionGivenDocblockType */ diff --git a/src/Uri.php b/src/Uri.php index 59f61d3..0223526 100644 --- a/src/Uri.php +++ b/src/Uri.php @@ -72,7 +72,7 @@ final class Uri implements UriInterface private ?string $cache = null; /** - * @param string $uri + * @param string $uri The URI string to parse. */ public function __construct(string $uri = '') {