Skip to content

Commit bfc868f

Browse files
committed
Remove foreach loops
1 parent 36ad0e4 commit bfc868f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/Curl/MultiCurl.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -746,15 +746,13 @@ private function initHandle($curl)
746746
$curl->complete($this->completeFunction);
747747
}
748748

749-
foreach ($this->options as $option => $value) {
750-
$curl->setOpt($option, $value);
751-
}
752-
foreach ($this->headers as $key => $value) {
753-
$curl->setHeader($key, $value);
754-
}
749+
$curl->setOpts($this->options);
750+
$curl->setHeaders($this->headers);
751+
755752
foreach ($this->cookies as $key => $value) {
756753
$curl->setCookie($key, $value);
757754
}
755+
758756
$curl->setJsonDecoder($this->jsonDecoder);
759757
$curl->setXmlDecoder($this->xmlDecoder);
760758

tests/PHPCurlClass/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
$test = '';
3737
if (isset($_SERVER['HTTP_X_DEBUG_TEST'])) {
3838
$test = $_SERVER['HTTP_X_DEBUG_TEST'];
39-
} else if (isset($_GET['test'])) {
39+
} elseif (isset($_GET['test'])) {
4040
$test = $_GET['test'];
4141
}
4242
$key = isset($data_values['key']) ? $data_values['key'] : '';

0 commit comments

Comments
 (0)