From 84b8382a535f89df1a4a0d1272a51e8c5a464f5e Mon Sep 17 00:00:00 2001 From: Honza Machala Date: Wed, 10 May 2017 11:33:56 +0200 Subject: [PATCH] Added strict return types to string|null --- src/Message/PaymentResponse.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Message/PaymentResponse.php b/src/Message/PaymentResponse.php index 2fbaa0d..0c5965e 100644 --- a/src/Message/PaymentResponse.php +++ b/src/Message/PaymentResponse.php @@ -13,9 +13,10 @@ public function getAuthCode() public function getTransactionReference() { - if (isset($this->data['payId'])) { - return $this->data['payId']; + if (isset($this->data['payId']) && !empty($this->data['payId'])) { + return (string) $this->data['payId']; } + return null; }