22
22
*/
23
23
class Client implements ClientInterface
24
24
{
25
- /** @var array */
25
+ /** @var array<mixed>|null */
26
26
private $ soapOptions ;
27
27
28
28
/** @var \SoapHeader[]|null */
@@ -50,6 +50,7 @@ public function __construct(
50
50
private readonly LoggerInterface $ logger ,
51
51
private readonly string $ code ,
52
52
private ?string $ wsdl ,
53
+ /** @var array<mixed> */
53
54
private array $ options = [],
54
55
) {
55
56
}
@@ -167,9 +168,6 @@ public function setLastResponseHeaders(?string $lastResponseHeaders): void
167
168
$ this ->lastResponseHeaders = $ lastResponseHeaders ;
168
169
}
169
170
170
- /**
171
- * @return bool|mixed
172
- */
173
171
public function call (string $ method , array $ input = []): mixed
174
172
{
175
173
$ this ->initializeSoapClient ();
@@ -187,6 +185,8 @@ public function call(string $method, array $input = []): mixed
187
185
}
188
186
189
187
/**
188
+ * @param array<mixed> $input
189
+ *
190
190
* @return bool|mixed
191
191
*/
192
192
protected function doSoapCall (string $ method , array $ input = []): mixed
@@ -196,7 +196,7 @@ protected function doSoapCall(string $method, array $input = []): mixed
196
196
}
197
197
try {
198
198
$ result = $ this ->getSoapClient ()->__soapCall ($ method , $ input , $ this ->getSoapOptions (), $ this ->getSoapHeaders ());
199
- } /* @noinspection PhpRedundantCatchClauseInspection */ catch (\SoapFault $ e ) {
199
+ } catch (\SoapFault $ e ) {
200
200
$ this ->getLastRequestTrace ();
201
201
$ this ->getLogger ()->alert (
202
202
\sprintf ("Soap call '%s' on '%s' failed : %s " , $ method , $ this ->getWsdl (), $ e ->getMessage ()),
@@ -239,6 +239,14 @@ protected function getLastRequestTrace(): void
239
239
}
240
240
}
241
241
242
+ /**
243
+ * @return array{
244
+ * 'LastRequest': ?string,
245
+ * 'LastRequestHeaders': ?string,
246
+ * 'LastResponse': ?string,
247
+ * 'LastResponseHeaders': ?string
248
+ * }
249
+ */
242
250
protected function getLastRequestTraceArray (): array
243
251
{
244
252
return [
0 commit comments