Skip to content

Commit 52971dc

Browse files
committed
Add callable return types for middlewares
1 parent 469a3e1 commit 52971dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Firebase/Http/Middleware.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ final class Middleware
2828
{
2929
/**
3030
* Ensures that the ".json" suffix is added to URIs and that the content type is set correctly.
31+
*
32+
* @return callable(callable): Closure
3133
*/
3234
public static function ensureJsonSuffix(): callable
3335
{
@@ -46,6 +48,8 @@ public static function ensureJsonSuffix(): callable
4648

4749
/**
4850
* @param array<string, mixed>|null $override
51+
*
52+
* @return callable(callable): Closure
4953
*/
5054
public static function addDatabaseAuthVariableOverride(?array $override): callable
5155
{
@@ -60,6 +64,9 @@ public static function addDatabaseAuthVariableOverride(?array $override): callab
6064
};
6165
}
6266

67+
/**
68+
* @return callable(callable): Closure
69+
*/
6370
public static function log(LoggerInterface $logger, MessageFormatter $formatter, string $logLevel, string $errorLogLevel): callable
6471
{
6572
return static fn(callable $handler): Closure => static fn($request, array $options) => $handler($request, $options)->then(

0 commit comments

Comments
 (0)