diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index c9fee7d..8cace65 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -171,7 +171,7 @@ public function serializeData($data) { * * @param string $uuid UUID in the API call * - * @param string $signature in the API call + * @param ?string $signature in the API call * * @param array $data in the API call * @@ -484,9 +484,9 @@ public function call($request) { /** * Return a boolean value formatted for communicating with the API. * - * @param boolean $value Boolean value to encode + * @param ?boolean $value Boolean value to encode * - * @return API encoded boolean value + * @return ?string API encoded boolean value */ protected function apiBool($value) { if(isset($value)) { diff --git a/Trustly/Data/data.php b/Trustly/Data/data.php index a77274b..7320a35 100644 --- a/Trustly/Data/data.php +++ b/Trustly/Data/data.php @@ -54,9 +54,9 @@ public function __construct() { * values. This is used to keep the requests cleaner rather then * supplying NULL values in the payload * - * @param array $data data to clean + * @param mixed $data data to clean * - * @return array cleaned data + * @return mixed cleaned data */ public function vacuum($data) { if(is_null($data)) { @@ -106,7 +106,7 @@ public function get($name=NULL) { * * @param string $str String to process * - * @return string UTF-8 variant of string + * @return ?string UTF-8 variant of string */ public static function ensureUTF8($str) { if($str == NULL) { diff --git a/Trustly/Data/jsonrpcnotificationrequest.php b/Trustly/Data/jsonrpcnotificationrequest.php index 6be3c5f..8bfc66a 100644 --- a/Trustly/Data/jsonrpcnotificationrequest.php +++ b/Trustly/Data/jsonrpcnotificationrequest.php @@ -135,7 +135,7 @@ public function getData($name=NULL) { /** * Get the UUID from the request. * - * @return string The UUID value + * @return ?string The UUID value */ public function getUUID() { return $this->getParams('uuid'); @@ -145,7 +145,7 @@ public function getUUID() { /** * Get the Method from the request. * - * @return string The Method value. + * @return ?string The Method value. */ public function getMethod() { return $this->get('method'); @@ -155,7 +155,7 @@ public function getMethod() { /** * Get the Signature from the request. * - * @return string The Signature value. + * @return ?string The Signature value. */ public function getSignature() { return $this->getParams('signature'); @@ -165,7 +165,7 @@ public function getSignature() { /** * Get the JSON RPC version from the request. * - * @return string The Version. + * @return ?string The Version. */ public function getVersion() { return $this->get('version'); diff --git a/Trustly/Data/jsonrpcnotificationresponse.php b/Trustly/Data/jsonrpcnotificationresponse.php index 87894a8..33b4d1d 100644 --- a/Trustly/Data/jsonrpcnotificationresponse.php +++ b/Trustly/Data/jsonrpcnotificationresponse.php @@ -73,7 +73,7 @@ public function __construct($request, $success=NULL) { * @param boolean $success Set to true to indicate that the notification * was successfully processed. * - * @return $success + * @return ?boolean $success */ public function setSuccess($success=NULL) { $status = 'OK'; @@ -198,7 +198,7 @@ public function setData($name, $value) { /** * Get the Method value from the response. * - * @return string The Method value. + * @return ?string The Method value. */ public function getMethod() { return $this->getResult('method'); @@ -208,7 +208,7 @@ public function getMethod() { /** * Get the UUID value from the response. * - * @return string The UUID value + * @return ?string The UUID value */ public function getUUID() { return $this->getResult('uuid'); diff --git a/Trustly/Data/jsonrpcrequest.php b/Trustly/Data/jsonrpcrequest.php index 2b10f9a..35bb820 100644 --- a/Trustly/Data/jsonrpcrequest.php +++ b/Trustly/Data/jsonrpcrequest.php @@ -149,7 +149,7 @@ public function setUUID($uuid) { /** * Get the UUID value from the outgoing call. * - * @return string The UUID value + * @return ?string The UUID value */ public function getUUID() { if(isset($this->payload['params']['UUID'])) { @@ -173,7 +173,7 @@ public function setMethod($method) { /** * Get the Method value from the outgoing call. * - * @return string The Method value. + * @return ?string The Method value. */ public function getMethod() { return $this->get('method'); diff --git a/Trustly/Data/jsonrpcresponse.php b/Trustly/Data/jsonrpcresponse.php index 98a2c4c..a53a72e 100644 --- a/Trustly/Data/jsonrpcresponse.php +++ b/Trustly/Data/jsonrpcresponse.php @@ -78,7 +78,7 @@ public function __construct($response_body) { /** * Get error code (if any) from the API response * - * @return integer The error code (numerical) + * @return ?integer The error code (numerical) */ public function getErrorCode() { if($this->isError() && isset($this->response_result['code'])) { @@ -90,7 +90,7 @@ public function getErrorCode() { /** * Get error message (if any) from the API response * - * @return string The error message + * @return ?string The error message */ public function getErrorMessage() { if($this->isError() && isset($this->response_result['message'])) { diff --git a/Trustly/Data/jsonrpcsignedresponse.php b/Trustly/Data/jsonrpcsignedresponse.php index 4b16b02..e26fa7a 100644 --- a/Trustly/Data/jsonrpcsignedresponse.php +++ b/Trustly/Data/jsonrpcsignedresponse.php @@ -116,7 +116,7 @@ public function getData($name=NULL) { /** * Get error code (if any) from the API call * - * @return integer The error code (numerical) + * @return ?integer The error code (numerical) */ public function getErrorCode() { if($this->isError() && isset($this->response_result['data']['code'])) { @@ -129,7 +129,7 @@ public function getErrorCode() { /** * Get error message (if any) from the API call * - * @return string The error message + * @return ?string The error message */ public function getErrorMessage() { if($this->isError() && isset($this->response_result['data']['message'])) { diff --git a/Trustly/Data/request.php b/Trustly/Data/request.php index 3daaca7..6a0b776 100644 --- a/Trustly/Data/request.php +++ b/Trustly/Data/request.php @@ -36,7 +36,7 @@ class Trustly_Data_Request extends Trustly_Data { /** * Call method name - * @var string + * @var ?string */ var $method = NULL; @@ -62,7 +62,7 @@ public function __construct($method=NULL, $payload=NULL) { /** * Convenience function for getting the uuid from the call * - * @return string uuid + * @return ?string uuid */ public function getUUID() { if(isset($this->payload['uuid'])) { @@ -85,7 +85,7 @@ public function setUUID($uuid) { /** * Get the method in the outgoing call * - * @return string method name + * @return ?string method name */ public function getMethod() { return $this->method; diff --git a/Trustly/Data/response.php b/Trustly/Data/response.php index 0f4b97b..4c6e682 100644 --- a/Trustly/Data/response.php +++ b/Trustly/Data/response.php @@ -135,7 +135,7 @@ public function isSuccess() { /** * Get error message (if any) from the API response * - * @return string The error message + * @return ?string The error message */ public function getErrorMessage() { if($this->isError()) { @@ -150,7 +150,7 @@ public function getErrorMessage() { /** * Get error code (if any) from the API response * - * @return integer The error code (numerical) + * @return ?integer The error code (numerical) */ public function getErrorCode() { if($this->isError()) { @@ -188,7 +188,7 @@ public function getResult($name=NULL) { /** * Convenience function for getting the uuid in the response * - * @param string uuid + * @return ?string uuid */ public function getUUID() { if(isset($this->response_result['uuid'])) { @@ -201,7 +201,7 @@ public function getUUID() { /** * Get the method from the response * - * @return string method name + * @return ?string method name */ public function getMethod() { if(isset($this->response_result['method'])) { @@ -214,7 +214,7 @@ public function getMethod() { /** * Get the signature from the response * - * @return string signature + * @return ?string signature */ public function getSignature() { if(isset($this->response_result['signature'])) {