Skip to content

Commit 5ae550d

Browse files
committed
Minor fixes
1 parent 8ff26d4 commit 5ae550d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Locator/SoapBodyLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class SoapBodyLocator
1313
{
1414
public function __invoke(DOMDocument $document): ?DOMElement
1515
{
16-
$soapNs = $document->namespaceURI ?? '';
16+
$soapNs = $document->documentElement->namespaceURI ?? '';
1717
$xpath = Document::fromUnsafeDocument($document)->xpath(namespaces(['soap' => $soapNs]));
1818

1919
return $xpath->query('//soap:Envelope/soap:Body')->first();

src/Locator/SoapHeaderLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class SoapHeaderLocator
1313
{
1414
public function __invoke(DOMDocument $document): ?DOMElement
1515
{
16-
$soapNs = $document->namespaceURI ?? '';
16+
$soapNs = $document->documentElement->namespaceURI ?? '';
1717
$xpath = Document::fromUnsafeDocument($document)->xpath(namespaces(['soap' => $soapNs]));
1818

1919
return $xpath->query('//soap:Envelope/soap:Header')->first();

src/Xpath/EnvelopePreset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function __construct(Document $document)
2222

2323
public function __invoke(DOMXPath $xpath): DOMXPath
2424
{
25-
namespaces(array_filter([
26-
'soap', $this->document->locate(root_namespace_uri()),
25+
return namespaces(array_filter([
26+
'soap' => $this->document->locate(root_namespace_uri()),
2727
'application' => $this->document->locate(new BodyNamespaceLocator()),
2828
]))($xpath);
2929
}

src/Xpath/WsdlPreset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public function __construct(Document $document)
2121

2222
public function __invoke(DOMXPath $xpath): DOMXPath
2323
{
24-
namespaces([
25-
'wsdl', $this->document->locate(root_namespace_uri()),
24+
return namespaces([
25+
'wsdl' => $this->document->locate(root_namespace_uri()),
2626
])($xpath);
2727
}
2828
}

0 commit comments

Comments
 (0)