This commit is contained in:
Andreas Schamberger 2011-12-04 17:29:50 +01:00
parent c7e8928dfa
commit a39af089f4
2 changed files with 8 additions and 6 deletions

View File

@ -89,7 +89,7 @@ class WsSecurityKey
*/ */
public function hasKeys() public function hasKeys()
{ {
return !is_null($this->privateKey) && !is_null($this->publicKey); return null !== $this->privateKey && null !== $this->publicKey;
} }
/** /**
@ -99,7 +99,7 @@ class WsSecurityKey
*/ */
public function hasPrivateKey() public function hasPrivateKey()
{ {
return !is_null($this->privateKey); return null !== $this->privateKey;
} }
/** /**
@ -109,6 +109,6 @@ class WsSecurityKey
*/ */
public function hasPublicKey() public function hasPublicKey()
{ {
return !is_null($this->publicKey); return null !== $this->publicKey;
} }
} }

View File

@ -94,7 +94,7 @@ class WsdlHandler
$query = '/wsdl:definitions/wsdl:binding/wsdl:operation/soap:operation[@soapAction="'.$soapAction.'"]/..'; $query = '/wsdl:definitions/wsdl:binding/wsdl:operation/soap:operation[@soapAction="'.$soapAction.'"]/..';
$nodes = $this->domXpath->query($query); $nodes = $this->domXpath->query($query);
$mimeTypes = array(); $mimeTypes = array();
if (($wsdlOperation = $nodes->item(0)) !== null) { if (null !== $wsdlOperation = $nodes->item(0)) {
//$wsdlOperationName = $wsdlOperation->getAttribute('name'); //$wsdlOperationName = $wsdlOperation->getAttribute('name');
foreach ($wsdlOperation->childNodes as $soapOperationChild) { foreach ($wsdlOperation->childNodes as $soapOperationChild) {
// wsdl:input or wsdl:output // wsdl:input or wsdl:output
@ -132,7 +132,7 @@ class WsdlHandler
} }
} else { } else {
$child = $soapOperationChild->getElementsByTagNameNS($this->wsdlSoapNamespace, 'body')->item(0); $child = $soapOperationChild->getElementsByTagNameNS($this->wsdlSoapNamespace, 'body')->item(0);
if (!is_null($child)) { if (null !== $child) {
$parts = $child->getAttribute('parts'); $parts = $child->getAttribute('parts');
$parts = ($parts == '') ? '[body]' : $parts; $parts = ($parts == '') ? '[body]' : $parts;
$mimeTypes[$operationType][$parts] = array('text/xml'); $mimeTypes[$operationType][$parts] = array('text/xml');
@ -141,6 +141,7 @@ class WsdlHandler
} }
} }
} }
return $mimeTypes; return $mimeTypes;
} }
@ -179,6 +180,7 @@ class WsdlHandler
} }
} }
} }
return false; return false;
} }
@ -189,7 +191,7 @@ class WsdlHandler
*/ */
private function loadWsdlInDom() private function loadWsdlInDom()
{ {
if (is_null($this->domDocument)) { if (null === $this->domDocument) {
$this->domDocument = new \DOMDocument('1.0', 'utf-8'); $this->domDocument = new \DOMDocument('1.0', 'utf-8');
$this->domDocument->load($this->wsdlFile); $this->domDocument->load($this->wsdlFile);
$this->domXpath = new \DOMXPath($this->domDocument); $this->domXpath = new \DOMXPath($this->domDocument);