mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Increaed phpstan level to 7
This commit is contained in:
@@ -17,8 +17,10 @@ class DropDefaultDomainFromRequestMiddleware implements MiddlewareInterface
|
||||
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
/** @var array $body */
|
||||
$body = $request->getParsedBody();
|
||||
$request = $request->withQueryParams($this->sanitizeDomainFromPayload($request->getQueryParams()))
|
||||
->withParsedBody($this->sanitizeDomainFromPayload($request->getParsedBody()));
|
||||
->withParsedBody($this->sanitizeDomainFromPayload($body));
|
||||
|
||||
return $handler->handle($request);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ class OverrideDomainMiddleware implements MiddlewareInterface
|
||||
$domain = $this->domainService->getDomain($domainId);
|
||||
|
||||
if ($requestMethod === RequestMethodInterface::METHOD_POST) {
|
||||
/** @var array $payload */
|
||||
$payload = $request->getParsedBody();
|
||||
$payload[ShortUrlInputFilter::DOMAIN] = $domain->getAuthority();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user