Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions library/Zend/XmlRpc/AbstractValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@ protected static function _xmlStringToNativeXmlRpc($xml)
}

if (null === $data) {
throw new Exception\ValueException('Invalid XML for XML-RPC native '. self::XMLRPC_TYPE_ARRAY .' type: ARRAY tag must contain DATA tag');
throw new Exception\ValueException(
'Invalid XML for XML-RPC native '
. self::XMLRPC_TYPE_ARRAY
. ' type: ARRAY tag must contain DATA tag'
);
}
$values = array();
// Parse all the elements of the array from the XML string
Expand All @@ -397,7 +401,9 @@ protected static function _xmlStringToNativeXmlRpc($xml)
$xmlrpcValue = new Value\Struct($values);
break;
default:
throw new Exception\ValueException('Value type \''. $type .'\' parsed from the XML string is not a known XML-RPC native type');
throw new Exception\ValueException(
'Value type \'' . $type . '\' parsed from the XML string is not a known XML-RPC native type'
);
break;
}
$xmlrpcValue->_setXML($xml->asXML());
Expand All @@ -415,7 +421,11 @@ protected static function _createSimpleXMLElement(&$xml)
$xml = new \SimpleXMLElement($xml);
} catch (\Exception $e) {
// The given string is not a valid XML
throw new Exception\ValueException('Failed to create XML-RPC value from XML string: ' . $e->getMessage(), $e->getCode(), $e);
throw new Exception\ValueException(
'Failed to create XML-RPC value from XML string: ' . $e->getMessage(),
$e->getCode(),
$e
);
}
}

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/XmlRpc/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function getIntrospector()
}


/**
/**
* The request of the last method call
*
* @return \Zend\XmlRpc\Request
Expand Down Expand Up @@ -251,7 +251,7 @@ public function doRequest($request, $response = null)
* @return mixed
* @throws \Zend\XmlRpc\Client\Exception\FaultException
*/
public function call($method, $params=array())
public function call($method, $params = array())
{
if (!$this->skipSystemLookup() && ('system.' != substr($method, 0, 7))) {
// Ensure empty array/struct params are cast correctly
Expand Down Expand Up @@ -323,7 +323,7 @@ public function call($method, $params=array())
throw new Client\Exception\FaultException(
$fault->getMessage(),
$fault->getCode()
);
);
}

return $this->lastResponse->getReturnValue();
Expand Down
5 changes: 4 additions & 1 deletion library/Zend/XmlRpc/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ public function loadFunctions($definition)
} else {
$type = gettype($definition);
}
throw new Server\Exception\InvalidArgumentException('Unable to load server definition; must be an array or Zend\Server\Definition, received ' . $type, 612);
throw new Server\Exception\InvalidArgumentException(
'Unable to load server definition; must be an array or Zend\Server\Definition, received ' . $type,
612
);
}

$this->table->clearMethods();
Expand Down