mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 15:05:40 +00:00
FIX: Removing return type declarations.
This commit is contained in:
parent
c1bfd5640d
commit
27994e51fa
@ -116,7 +116,7 @@ class CacheHeadersCheck implements EnvironmentCheck
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getMessage(): string
|
||||
private function getMessage()
|
||||
{
|
||||
$ret = '';
|
||||
// Filter good messages
|
||||
@ -159,7 +159,7 @@ class CacheHeadersCheck implements EnvironmentCheck
|
||||
* @param ResponseInterface $response
|
||||
* @return void
|
||||
*/
|
||||
private function checkEtag(ResponseInterface $response): void
|
||||
private function checkEtag(ResponseInterface $response)
|
||||
{
|
||||
$eTag = $response->getHeaderLine('ETag');
|
||||
$fullURL = Controller::join_links(Director::absoluteBaseURL(), $this->url);
|
||||
@ -183,7 +183,7 @@ class CacheHeadersCheck implements EnvironmentCheck
|
||||
* @param ResponseInterface $response
|
||||
* @return void
|
||||
*/
|
||||
private function checkCacheControl(ResponseInterface $response): void
|
||||
private function checkCacheControl(ResponseInterface $response)
|
||||
{
|
||||
$cacheControl = $response->getHeaderLine('Cache-Control');
|
||||
$vals = array_map('trim', explode(',', $cacheControl));
|
||||
|
@ -47,7 +47,7 @@ class SessionCheck implements EnvironmentCheck
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function check(): array
|
||||
public function check()
|
||||
{
|
||||
$response = $this->fetchResponse($this->url);
|
||||
$cookie = $this->getCookie($response);
|
||||
@ -71,7 +71,7 @@ class SessionCheck implements EnvironmentCheck
|
||||
* @param ResponseInterface $response
|
||||
* @return string|null Cookie contents or null if it doesn't exist
|
||||
*/
|
||||
public function getCookie(ResponseInterface $response): ?string
|
||||
public function getCookie(ResponseInterface $response)
|
||||
{
|
||||
$result = null;
|
||||
$cookies = $response->getHeader('Set-Cookie');
|
||||
|
@ -25,7 +25,7 @@ trait Fetcher
|
||||
* @param array $extraConfig
|
||||
* @return array
|
||||
*/
|
||||
private function getClientConfig(array $extraConfig = []) : array
|
||||
private function getClientConfig(array $extraConfig = [])
|
||||
{
|
||||
return array_merge($this->clientConfig, $extraConfig);
|
||||
}
|
||||
@ -37,7 +37,7 @@ trait Fetcher
|
||||
* @param array|null $extraConfig Extra configuration
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function fetchResponse(string $url, ? array $extraConfig = []) : ? ResponseInterface
|
||||
public function fetchResponse(string $url, ? array $extraConfig = [])
|
||||
{
|
||||
$config = $this->getClientConfig($extraConfig);
|
||||
$client = new Client($config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user