Skip to content

Commit 2c3e5b4

Browse files
committed
chore: code clean up
- Changed wrong method comment in Soap facade `options` to `withOptions` - Changed deprecated `for_promise` function to `Create::forPromise` - Changed used client in SoapClient.php for HttpPlug from `Http\Adapter\Guzzle7\Client` to `GuzzleHttp\Client`
1 parent 00e5d52 commit 2c3e5b4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/Facades/Soap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @method static \CodeDredd\Soap\SoapClient stub(callable $callback)
1313
* @method static \CodeDredd\Soap\SoapClient buildClient(string $setup = '')
1414
* @method static \CodeDredd\Soap\SoapClient byConfig(string $setup = '')
15-
* @method static \CodeDredd\Soap\SoapClient options(array $options)
15+
* @method static \CodeDredd\Soap\SoapClient withOptions(array $options)
1616
* @method static \CodeDredd\Soap\SoapClient handlerOptions(array $options)
1717
* @method static \CodeDredd\Soap\SoapClient withWsse(array $config)
1818
* @method static \CodeDredd\Soap\SoapClient withWsa()

src/SoapClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use CodeDredd\Soap\Exceptions\SoapException;
1010
use CodeDredd\Soap\Middleware\WsseMiddleware;
1111
use GuzzleHttp\HandlerStack;
12-
use Http\Adapter\Guzzle7\Client;
12+
use GuzzleHttp\Client;
1313
use Http\Client\Exception\HttpException;
1414
use Illuminate\Contracts\Validation\Validator;
1515
use Illuminate\Support\Str;
@@ -132,7 +132,7 @@ function (Request $request, array $options) {
132132
protected function setHandler(HandlerInterface $handler = null)
133133
{
134134
$this->handler = $handler ?? HttPlugHandle::createForClient(
135-
Client::createWithConfig($this->handlerOptions)
135+
new Client($this->handlerOptions)
136136
);
137137
$this->addMiddleware();
138138

src/SoapFactory.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
namespace CodeDredd\Soap;
44

55
use Closure;
6-
use CodeDredd\Soap\Client\Request;
76
use CodeDredd\Soap\Client\ResponseSequence;
8-
use function GuzzleHttp\Promise\promise_for;
7+
use GuzzleHttp\Promise\Create;
98
use GuzzleHttp\Psr7\Response as Psr7Response;
109
use Illuminate\Support\Str;
1110
use Illuminate\Support\Traits\Macroable;
@@ -216,7 +215,7 @@ public static function response($body = null, $status = 200, $headers = [])
216215
]);
217216
}
218217

219-
return promise_for(new Psr7Response($status, $headers, $body));
218+
return Create::promiseFor(new Psr7Response($status, $headers, $body));
220219
}
221220

222221
/**

0 commit comments

Comments
 (0)