mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-06-16 09:41:37 +02:00
Fix lint
This commit is contained in:
parent
a73fa23a76
commit
153752e81d
|
@ -33,11 +33,11 @@ class CurlLinkChecker implements LinkChecker
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow to pass custom header to be in CURL request
|
* Allow to pass custom header to be in CURL request
|
||||||
*
|
*
|
||||||
* @config
|
* @config
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $headers = [];
|
private static $headers = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return cache
|
* Return cache
|
||||||
|
@ -83,11 +83,11 @@ class CurlLinkChecker implements LinkChecker
|
||||||
// Add headers
|
// Add headers
|
||||||
$headers = (array) $this->config()->get('headers');
|
$headers = (array) $this->config()->get('headers');
|
||||||
if (!empty($headers)) {
|
if (!empty($headers)) {
|
||||||
array_walk($headers, function(&$value, $header) {
|
array_walk($headers, function (&$value, $header) {
|
||||||
$value = "$header: $value";
|
$value = "$header: $value";
|
||||||
});
|
});
|
||||||
curl_setopt($handle, CURLOPT_HTTPHEADER , $headers);
|
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve http code
|
// Retrieve http code
|
||||||
curl_exec($handle);
|
curl_exec($handle);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user