chore: fix rector issues with filters' methods return types

This commit is contained in:
Yassine Doghri 2025-08-25 17:08:21 +00:00
parent 5b4403e87e
commit 3d7969d1da
2 changed files with 5 additions and 5 deletions

View File

@ -12,11 +12,11 @@ class AllowCorsFilter implements FilterInterface
{
/**
* @param string[]|null $arguments
* @return RequestInterface|ResponseInterface|string|void
* @return RequestInterface|ResponseInterface|string|null
*/
public function before(RequestInterface $request, $arguments = null)
{
// Do something here
return null;
}
/**
@ -29,7 +29,7 @@ class AllowCorsFilter implements FilterInterface
$response->setHeader('Cache-Control', 'public, max-age=86400');
}
$response->setHeader('Access-Control-Allow-Origin', '*') // for allowing any domain, insecure
return $response->setHeader('Access-Control-Allow-Origin', '*') // for allowing any domain, insecure
->setHeader('Access-Control-Allow-Headers', '*') // for allowing any headers, insecure
->setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS') // allows GET and OPTIONS methods only
->setHeader('Access-Control-Max-Age', '86400');

View File

@ -65,10 +65,10 @@ class ApiFilter implements FilterInterface
/**
* @param string[]|null $arguments
*
* @return ResponseInterface|void
* @return ResponseInterface|null
*/
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
{
// Do something here
return null;
}
}