Updated to coding styles v2

This commit is contained in:
Alejandro Celaya
2019-10-05 17:26:10 +02:00
parent 09a5284675
commit e0d20bf8ff
311 changed files with 344 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Rest\Middleware;
@@ -57,7 +58,8 @@ class AuthenticationMiddleware implements MiddlewareInterface, StatusCodeInterfa
{
/** @var RouteResult|null $routeResult */
$routeResult = $request->getAttribute(RouteResult::class);
if ($routeResult === null
if (
$routeResult === null
|| $routeResult->isFailure()
|| $request->getMethod() === self::METHOD_OPTIONS
|| contains($this->routesWhitelist, $routeResult->getMatchedRouteName())