Remove foreach loops

This commit is contained in:
Zach Borboa
2016-09-24 01:22:44 -07:00
parent 36ad0e4ecf
commit bfc868fab4
2 changed files with 5 additions and 7 deletions
+4 -6
View File
@@ -746,15 +746,13 @@ class MultiCurl
$curl->complete($this->completeFunction);
}
foreach ($this->options as $option => $value) {
$curl->setOpt($option, $value);
}
foreach ($this->headers as $key => $value) {
$curl->setHeader($key, $value);
}
$curl->setOpts($this->options);
$curl->setHeaders($this->headers);
foreach ($this->cookies as $key => $value) {
$curl->setCookie($key, $value);
}
$curl->setJsonDecoder($this->jsonDecoder);
$curl->setXmlDecoder($this->xmlDecoder);
+1 -1
View File
@@ -36,7 +36,7 @@ if ($request_method === 'POST') {
$test = '';
if (isset($_SERVER['HTTP_X_DEBUG_TEST'])) {
$test = $_SERVER['HTTP_X_DEBUG_TEST'];
} else if (isset($_GET['test'])) {
} elseif (isset($_GET['test'])) {
$test = $_GET['test'];
}
$key = isset($data_values['key']) ? $data_values['key'] : '';