mirror of
https://code.castopod.org/adaures/castopod
synced 2025-08-26 06:19:27 +00:00
chore: fix rector issues with filters' methods return types
This commit is contained in:
parent
5b4403e87e
commit
3d7969d1da
@ -12,11 +12,11 @@ class AllowCorsFilter implements FilterInterface
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string[]|null $arguments
|
* @param string[]|null $arguments
|
||||||
* @return RequestInterface|ResponseInterface|string|void
|
* @return RequestInterface|ResponseInterface|string|null
|
||||||
*/
|
*/
|
||||||
public function before(RequestInterface $request, $arguments = 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('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-Headers', '*') // for allowing any headers, insecure
|
||||||
->setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS') // allows GET and OPTIONS methods only
|
->setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS') // allows GET and OPTIONS methods only
|
||||||
->setHeader('Access-Control-Max-Age', '86400');
|
->setHeader('Access-Control-Max-Age', '86400');
|
||||||
|
@ -65,10 +65,10 @@ class ApiFilter implements FilterInterface
|
|||||||
/**
|
/**
|
||||||
* @param string[]|null $arguments
|
* @param string[]|null $arguments
|
||||||
*
|
*
|
||||||
* @return ResponseInterface|void
|
* @return ResponseInterface|null
|
||||||
*/
|
*/
|
||||||
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
|
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
|
||||||
{
|
{
|
||||||
// Do something here
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user