Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3982' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Mar 12, 2013
2 parents b15a93e + 8375980 commit b8734d1
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions src/AutoDiscover.php
Expand Up @@ -95,27 +95,26 @@ class AutoDiscover
/**
* Constructor
*
* @param ComplexTypeStrategy $strategy
* @param string|Uri\Uri $endpointUri
* @param string $wsdlClass
* @param array $classMap
* @param null|ComplexTypeStrategy $strategy
* @param null|string|Uri\Uri $endpointUri
* @param null|string $wsdlClass
* @param null|array $classMap
*/
public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri=null, $wsdlClass=null, array $classMap = array())
public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri = null, $wsdlClass = null, array $classMap = array())
{
$this->reflection = new Reflection();
$this->discoveryStrategy = new ReflectionDiscovery();

if ($strategy !== null) {
if (null !== $strategy) {
$this->setComplexTypeStrategy($strategy);
}

if ($endpointUri !== null) {
if (null !== $endpointUri) {
$this->setUri($endpointUri);
}

if ($wsdlClass !== null) {
if (null !== $wsdlClass) {
$this->setWsdlClass($wsdlClass);
}
$this->setClassMap($classMap);
}

/**
Expand Down Expand Up @@ -150,9 +149,19 @@ public function getClassMap()

/**
* Set the class map of php to wsdl qname types.
*
* @param array $classmap
* @return AutoDiscover
*/
public function setClassMap($classMap)
{
if (!is_array($classMap)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects an array; received "%s"',
__METHOD__,
(is_object($classMap) ? get_class($classMap) : gettype($classMap))
));
}
$this->classMap = $classMap;
return $this;
}
Expand Down Expand Up @@ -275,7 +284,7 @@ public function getWsdlClass()
* @return AutoDiscover
* @throws Exception\InvalidArgumentException
*/
public function setOperationBodyStyle(array $operationStyle=array())
public function setOperationBodyStyle(array $operationStyle = array())
{
if (!isset($operationStyle['use'])) {
throw new Exception\InvalidArgumentException("Key 'use' is required in Operation soap:body style.");
Expand All @@ -292,7 +301,7 @@ public function setOperationBodyStyle(array $operationStyle=array())
* @param array $bindingStyle
* @return AutoDiscover
*/
public function setBindingStyle(array $bindingStyle=array())
public function setBindingStyle(array $bindingStyle = array())
{
if (isset($bindingStyle['style'])) {
$this->bindingStyle['style'] = $bindingStyle['style'];
Expand Down

0 comments on commit b8734d1

Please sign in to comment.