Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 80e8203

Browse files
committed
Merge pull request #7 from joelwurtz/feature/remove-send-requests
Remove sendRequests method
2 parents ed80bb0 + c83ebc2 commit 80e8203

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
],
1717
"require": {
1818
"php": ">=5.5.0",
19-
"php-http/httplug": "^1.0@dev",
20-
"php-http/utils": "^0.1@dev",
19+
"php-http/httplug": "^1.0",
2120
"guzzlehttp/guzzle": "^6.0"
2221
},
2322
"require-dev": {

src/Guzzle6HttpAdapter.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,6 @@ public function sendRequest(RequestInterface $request)
5454
}
5555
}
5656

57-
/**
58-
* {@inheritdoc}
59-
*/
60-
public function sendRequests(array $requests)
61-
{
62-
$poolResult = Pool::batch($this->client, $requests);
63-
$batchResult = new BatchResult();
64-
65-
foreach ($poolResult as $index => $result) {
66-
if ($result instanceof ResponseInterface) {
67-
$batchResult = $batchResult->addResponse($requests[$index], $result);
68-
}
69-
70-
if ($result instanceof RequestException) {
71-
$batchResult = $batchResult->addException($requests[$index], $this->createException($result));
72-
}
73-
}
74-
75-
if ($batchResult->hasExceptions()) {
76-
throw new BatchException($batchResult);
77-
}
78-
79-
return $batchResult;
80-
}
81-
8257
/**
8358
* Converts a Guzzle exception into an Httplug exception
8459
*

0 commit comments

Comments
 (0)