Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 9 additions & 5 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
25 changes: 15 additions & 10 deletions src/ServerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [],
Expand Down
6 changes: 4 additions & 2 deletions src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+')
{
Expand Down
13 changes: 8 additions & 5 deletions src/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '')
{
Expand Down