mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 15:05:44 +00:00
FIX Update linting in CurlLinkChecker for PSR-2
This commit is contained in:
parent
2279b2c9d8
commit
717b126dda
@ -58,7 +58,9 @@ class CurlLinkChecker implements LinkChecker
|
||||
// Check if we have a cached result
|
||||
$cacheKey = md5($href);
|
||||
$result = $this->getCache()->load($cacheKey);
|
||||
if($result !== false) return $result;
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we have a cached result
|
||||
@ -72,7 +74,7 @@ class CurlLinkChecker implements LinkChecker
|
||||
$handle = curl_init($href);
|
||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||
if ($this->config()->get('follow_location')) {
|
||||
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, TRUE);
|
||||
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
|
||||
}
|
||||
curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($handle, CURLOPT_TIMEOUT, 10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user