Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent b479725 commit 949cd96
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"spiral/auth": "^3.15",
"spiral/auth": "^3.14.8",
"psr/http-message": "^1.0|^2.0",
"psr/http-server-middleware": "^1.0",
"psr/event-dispatcher": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^10.1",
"spiral/cookies": "^3.15",
"spiral/http": "^3.15",
"spiral/debug": "^3.15",
"spiral/cookies": "^3.14.8",
"spiral/http": "^3.14.8",
"spiral/debug": "^3.14.8",
"nyholm/psr7": "^1.5",
"vimeo/psalm": "^5.9"
},
Expand Down
2 changes: 1 addition & 1 deletion src/HttpTransportInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function commitToken(
Request $request,
Response $response,
string $tokenID,
\DateTimeInterface $expiresAt = null
?\DateTimeInterface $expiresAt = null
): Response;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Transport/CookieTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function fetchToken(Request $request): ?string
public function commitToken(
Request $request,
Response $response,
string $tokenID = null,
\DateTimeInterface $expiresAt = null
?string $tokenID = null,
?\DateTimeInterface $expiresAt = null
): Response {
/** @var CookieQueue $cookieQueue */
$cookieQueue = $request->getAttribute(CookieQueue::ATTRIBUTE);
Expand Down Expand Up @@ -82,7 +82,7 @@ public function removeToken(Request $request, Response $response, string $tokenI
/**
* @return int<0, max>|null
*/
private function getLifetime(\DateTimeInterface $expiresAt = null): ?int
private function getLifetime(?\DateTimeInterface $expiresAt = null): ?int
{
if ($expiresAt === null) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/HeaderTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function commitToken(
Request $request,
Response $response,
string $tokenID,
\DateTimeInterface $expiresAt = null
?\DateTimeInterface $expiresAt = null
): Response {
if ($request->hasHeader($this->header) && $this->extractToken($request) === $tokenID) {
return $response;
Expand Down
2 changes: 1 addition & 1 deletion src/TransportRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function setTransport(string $name, HttpTransportInterface $transport): v
$this->transports[$name] = $transport;
}

public function getTransport(string $name = null): HttpTransportInterface
public function getTransport(?string $name = null): HttpTransportInterface
{
$name ??= $this->default;

Expand Down
6 changes: 3 additions & 3 deletions tests/Diactoros/UploadedFileFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface
*/
public function createUploadedFile(
StreamInterface $stream,
int $size = null,
?int $size = null,
int $error = \UPLOAD_ERR_OK,
string $clientFilename = null,
string $clientMediaType = null
?string $clientFilename = null,
?string $clientMediaType = null
): UploadedFileInterface {
if ($size === null) {
$size = $stream->getSize();
Expand Down
2 changes: 1 addition & 1 deletion tests/Stub/TestAuthHttpStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function load(string $id): ?TokenInterface
return new TestAuthHttpToken($id, ['id' => $id]);
}

public function create(array $payload, \DateTimeInterface $expiresAt = null): TokenInterface
public function create(array $payload, ?\DateTimeInterface $expiresAt = null): TokenInterface
{
return new TestAuthHttpToken(
$payload['id'],
Expand Down
2 changes: 1 addition & 1 deletion tests/Stub/TestAuthHttpToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestAuthHttpToken implements TokenInterface
* @param array $payload
* @param \DateTimeInterface|null $expiresAt
*/
public function __construct(string $id, array $payload, \DateTimeInterface $expiresAt = null)
public function __construct(string $id, array $payload, ?\DateTimeInterface $expiresAt = null)
{
$this->id = $id;
$this->expiresAt = $expiresAt;
Expand Down

0 comments on commit 949cd96

Please sign in to comment.