mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 08:13:11 +08:00
Fixed all possible PHPStan errors
This commit is contained in:
@@ -55,13 +55,14 @@ class CheckAuthenticationMiddleware implements MiddlewareInterface, StatusCodeIn
|
||||
*
|
||||
* @return Response
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \ErrorException
|
||||
*/
|
||||
public function process(Request $request, DelegateInterface $delegate)
|
||||
{
|
||||
// If current route is the authenticate route or an OPTIONS request, continue to the next middleware
|
||||
/** @var RouteResult $routeResult */
|
||||
/** @var RouteResult|null $routeResult */
|
||||
$routeResult = $request->getAttribute(RouteResult::class);
|
||||
if (! isset($routeResult)
|
||||
if ($routeResult === null
|
||||
|| $routeResult->isFailure()
|
||||
|| $routeResult->getMatchedRouteName() === AuthenticateAction::class
|
||||
|| $request->getMethod() === 'OPTIONS'
|
||||
|
||||
Reference in New Issue
Block a user