FIX: Removing return type declarations.

This commit is contained in:
Frank Mullenger 2019-02-15 13:42:41 +13:00
parent c1bfd5640d
commit 27994e51fa
3 changed files with 7 additions and 7 deletions

View File

@ -116,7 +116,7 @@ class CacheHeadersCheck implements EnvironmentCheck
* *
* @return string * @return string
*/ */
private function getMessage(): string private function getMessage()
{ {
$ret = ''; $ret = '';
// Filter good messages // Filter good messages
@ -159,7 +159,7 @@ class CacheHeadersCheck implements EnvironmentCheck
* @param ResponseInterface $response * @param ResponseInterface $response
* @return void * @return void
*/ */
private function checkEtag(ResponseInterface $response): void private function checkEtag(ResponseInterface $response)
{ {
$eTag = $response->getHeaderLine('ETag'); $eTag = $response->getHeaderLine('ETag');
$fullURL = Controller::join_links(Director::absoluteBaseURL(), $this->url); $fullURL = Controller::join_links(Director::absoluteBaseURL(), $this->url);
@ -183,7 +183,7 @@ class CacheHeadersCheck implements EnvironmentCheck
* @param ResponseInterface $response * @param ResponseInterface $response
* @return void * @return void
*/ */
private function checkCacheControl(ResponseInterface $response): void private function checkCacheControl(ResponseInterface $response)
{ {
$cacheControl = $response->getHeaderLine('Cache-Control'); $cacheControl = $response->getHeaderLine('Cache-Control');
$vals = array_map('trim', explode(',', $cacheControl)); $vals = array_map('trim', explode(',', $cacheControl));

View File

@ -47,7 +47,7 @@ class SessionCheck implements EnvironmentCheck
* *
* @return array * @return array
*/ */
public function check(): array public function check()
{ {
$response = $this->fetchResponse($this->url); $response = $this->fetchResponse($this->url);
$cookie = $this->getCookie($response); $cookie = $this->getCookie($response);
@ -71,7 +71,7 @@ class SessionCheck implements EnvironmentCheck
* @param ResponseInterface $response * @param ResponseInterface $response
* @return string|null Cookie contents or null if it doesn't exist * @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; $result = null;
$cookies = $response->getHeader('Set-Cookie'); $cookies = $response->getHeader('Set-Cookie');

View File

@ -25,7 +25,7 @@ trait Fetcher
* @param array $extraConfig * @param array $extraConfig
* @return array * @return array
*/ */
private function getClientConfig(array $extraConfig = []) : array private function getClientConfig(array $extraConfig = [])
{ {
return array_merge($this->clientConfig, $extraConfig); return array_merge($this->clientConfig, $extraConfig);
} }
@ -37,7 +37,7 @@ trait Fetcher
* @param array|null $extraConfig Extra configuration * @param array|null $extraConfig Extra configuration
* @return ResponseInterface * @return ResponseInterface
*/ */
public function fetchResponse(string $url, ? array $extraConfig = []) : ? ResponseInterface public function fetchResponse(string $url, ? array $extraConfig = [])
{ {
$config = $this->getClientConfig($extraConfig); $config = $this->getClientConfig($extraConfig);
$client = new Client($config); $client = new Client($config);