Skip to content

Commit 667aed7

Browse files
authored
Merge pull request #21 from meng-tian/improve-return
Add return types for Interpreter and Soap
2 parents 8676d66 + e7216c6 commit 667aed7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Interpreter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct($wsdl, array $options = [])
2929
* @param mixed $input_headers An array of headers to be interpreted along with the SOAP request.
3030
* @return SoapRequest
3131
*/
32-
public function request($function_name, array $arguments = [], array $options = null, $input_headers = null)
32+
public function request($function_name, array $arguments = [], array $options = null, $input_headers = null): SoapRequest
3333
{
3434
return $this->soap->request($function_name, $arguments, $options, $input_headers);
3535
}

src/Soap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct($wsdl, array $options)
3434
parent::__construct($wsdl, $options);
3535
}
3636

37-
public function __doRequest($request, $location, $action, $version, $one_way = 0)
37+
public function __doRequest($request, $location, $action, $version, $one_way = 0): ?string
3838
{
3939
if (null !== $this->soapResponse) {
4040
return $this->soapResponse;
@@ -47,7 +47,7 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0
4747
return '';
4848
}
4949

50-
public function request($function_name, $arguments, $options, $input_headers)
50+
public function request($function_name, $arguments, $options, $input_headers): SoapRequest
5151
{
5252
$this->__soapCall($function_name, $arguments, $options, $input_headers);
5353
return new SoapRequest($this->endpoint, $this->soapAction, $this->soapVersion, $this->soapRequest);

0 commit comments

Comments
 (0)