Skip to content

Commit

Permalink
Add docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
jenky committed Nov 8, 2024
1 parent 64e03b9 commit 21b73ea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Middleware/Auth/AuthenticationMiddlewareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ trait AuthenticationMiddlewareTrait
*/
private $token;

/**
* @param callable(RequestInterface): ResponseInterface $next
*/
public function __invoke(RequestInterface $request, callable $next): ResponseInterface
{
return $next($request->withHeader('Authorization', (string) $this->token));
Expand Down
3 changes: 3 additions & 0 deletions src/Middleware/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public function __construct(AuthenticatorInterface $authenticator)
$this->authenticator = $authenticator;
}

/**
* @param callable(RequestInterface): ResponseInterface $next
*/
public function __invoke(RequestInterface $request, callable $next): ResponseInterface
{
return $next($this->authenticator->authenticate($request));
Expand Down
3 changes: 3 additions & 0 deletions src/Middleware/FollowRedirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public function __construct(
$this->referer = $referer;
}

/**
* @param callable(RequestInterface): ResponseInterface $next
*/
public function __invoke(RequestInterface $request, callable $next): ResponseInterface
{
$response = $next($request);
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/RetryRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __construct(RetryStrategyInterface $strategy, int $maxRetries =
}

/**
* @param callable(RequestInterface): ResponseInterface $next
* @throws \Fansipan\Exception\RequestRetryFailedException
*/
public function __invoke(RequestInterface $request, callable $next): ResponseInterface
Expand Down

0 comments on commit 21b73ea

Please sign in to comment.