Skip to content
Open
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
6 changes: 3 additions & 3 deletions Trustly/Api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions Trustly/Data/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions Trustly/Data/jsonrpcnotificationrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions Trustly/Data/jsonrpcnotificationresponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
Expand All @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions Trustly/Data/jsonrpcrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand All @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions Trustly/Data/jsonrpcresponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand All @@ -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'])) {
Expand Down
4 changes: 2 additions & 2 deletions Trustly/Data/jsonrpcsignedresponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand All @@ -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'])) {
Expand Down
6 changes: 3 additions & 3 deletions Trustly/Data/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class Trustly_Data_Request extends Trustly_Data {
/**
* Call method name
* @var string
* @var ?string
*/
var $method = NULL;

Expand All @@ -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'])) {
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions Trustly/Data/response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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()) {
Expand Down Expand Up @@ -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'])) {
Expand All @@ -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'])) {
Expand All @@ -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'])) {
Expand Down