mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Replaced regular callbacks by arrow functions when possible
This commit is contained in:
@@ -43,9 +43,7 @@ class RequestToHttpAuthPlugin implements RequestToHttpAuthPluginInterface
|
||||
{
|
||||
return array_reduce(
|
||||
self::SUPPORTED_AUTH_HEADERS,
|
||||
function (bool $carry, string $header) use ($request) {
|
||||
return $carry || $request->hasHeader($header);
|
||||
},
|
||||
fn (bool $carry, string $header) => $carry || $request->hasHeader($header),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ class EmptyResponseImplicitOptionsMiddlewareFactory
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
return new ImplicitOptionsMiddleware(function () {
|
||||
return new EmptyResponse();
|
||||
});
|
||||
return new ImplicitOptionsMiddleware(fn () => new EmptyResponse());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user