From 836738f59c425ff0289c78070332f9de1c4d8465 Mon Sep 17 00:00:00 2001
From: Gustavo Meyer
* The return value is cast to an integer.
* @since 5.1.0
+ *
+ * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6
+ * the #[\ReturnTypeWillChange] must be removed once 5.6
*/
+ #[\ReturnTypeWillChange]
public function count() {
return count($this->errors);
}
@@ -102,7 +106,11 @@ public function count() {
*
* The return value will be casted to boolean if non-boolean was returned.
* @since 5.0.0
+ *
+ * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6
+ * the #[\ReturnTypeWillChange] must be removed once 5.6
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset) {
return isset($this->errors[$offset]);
}
@@ -117,7 +125,11 @@ public function offsetExists($offset) {
*
* The return value is cast to an integer. * @since 5.1.0 + * + * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6 + * the #[\ReturnTypeWillChange] must be removed once 5.6 */ + #[\ReturnTypeWillChange] public function count() { return count($this->data); } @@ -139,7 +143,11 @@ public function count() { *
* The return value will be casted to boolean if non-boolean was returned. * @since 5.0.0 + * + * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6 + * the #[\ReturnTypeWillChange] must be removed once 5.6 */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->data[$offset]); } @@ -154,7 +162,11 @@ public function offsetExists($offset) { *
* @return mixed Can return all value types. * @since 5.0.0 + * + * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6 + * the #[\ReturnTypeWillChange] must be removed once 5.6 */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->data[$offset]; } @@ -172,7 +184,11 @@ public function offsetGet($offset) { * * @return void * @since 5.0.0 + * + * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6 + * the #[\ReturnTypeWillChange] must be removed once 5.6 */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->data[$offset] = $value; } @@ -187,7 +203,11 @@ public function offsetSet($offset, $value) { * * @return void * @since 5.0.0 + * + * Note: Temporarily suppress the required return type, to keep compatibility with PHP 5.6 + * the #[\ReturnTypeWillChange] must be removed once 5.6 */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->data[$offset]); } diff --git a/tests/Hyperwallet/Tests/HyperwalletTest.php b/tests/Hyperwallet/Tests/HyperwalletTest.php index 0457e065..81f0fd3a 100644 --- a/tests/Hyperwallet/Tests/HyperwalletTest.php +++ b/tests/Hyperwallet/Tests/HyperwalletTest.php @@ -705,7 +705,7 @@ public function testListPaperChecks_noParameters() { $client = new Hyperwallet('test-username', 'test-password', 'test-program-token'); $apiClientMock = $this->createAndInjectApiClientMock($client); - \Phake::when($apiClientMock)->doGet('/rest/v4/users/{user-token}/paper-checks', array('user-token' => 'test-user-token'), array())->thenReturn(array('limit' => 1,'limit' => 1,'hasNextPage' => false ,'hasPreviousPage' => false,'links' => 'links', 'data' => array())); + \Phake::when($apiClientMock)->doGet('/rest/v4/users/{user-token}/paper-checks', array('user-token' => 'test-user-token'), array())->thenReturn(array('limit' => 1,'hasNextPage' => false ,'hasPreviousPage' => false,'links' => 'links', 'data' => array())); // Run test $paperCheckList = $client->listPaperChecks('test-user-token'); @@ -4233,6 +4233,7 @@ public function testUpdateVerificationStatus_allParameters() { \Phake::when($apiClientMock)->doPut('/rest/v4/users/{user-token}', array('user-token' => 'test-user-token'), $user, array())->thenReturn(array("status"=> User::STATUS_PRE_ACTIVATED, 'verificationStatus'=> User::VERIFICATION_STATUS_REQUIRED)); \Phake::when($apiClientMock)->doGet('/rest/v4/users/{user-token}', array('user-token' => 'test-user-token'), array())->thenReturn(array("status"=> User::STATUS_PRE_ACTIVATED, 'verificationStatus'=> User::VERIFICATION_STATUS_REQUIRED)); + $responseUser = null; // Run test try { $responseUser = $client->updateVerificationStatus('test-user-token', User::VERIFICATION_STATUS_REQUESTED); @@ -5112,6 +5113,7 @@ public function testGetTransferRefund_successful() { $uriParams, $queryParams)->thenReturn(array('token' => $refundToken)); // Run test + $transferRefund = null; try { $transferRefund = $client->getTransferRefund($transferToken, $refundToken); } catch (HyperwalletArgumentException $e) { diff --git a/tests/Hyperwallet/Tests/Model/ClientTokenTest.php b/tests/Hyperwallet/Tests/Model/ClientTokenTest.php index 640c2752..d17e4d7d 100644 --- a/tests/Hyperwallet/Tests/Model/ClientTokenTest.php +++ b/tests/Hyperwallet/Tests/Model/ClientTokenTest.php @@ -1,7 +1,7 @@ Date: Fri, 26 Aug 2022 13:17:12 -0700 Subject: [PATCH 3/5] DTSERWONE-1083 - Fix documentation errors and Access to an undefined property for businessName --- src/Hyperwallet/Model/BusinessStakeholder.php | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/Hyperwallet/Model/BusinessStakeholder.php b/src/Hyperwallet/Model/BusinessStakeholder.php index 518aaa54..83c2fb2b 100644 --- a/src/Hyperwallet/Model/BusinessStakeholder.php +++ b/src/Hyperwallet/Model/BusinessStakeholder.php @@ -5,10 +5,10 @@ * Represents a V4 BusinessStakeholder * * @property string $token The BusinessStakeholder token - * @property boolen $isBusinessContact The business contact - * @property boolen $isDirector The Director - * @property boolen $isUltimateBeneficialOwner The UltimateBeneficial Owner - * @property boolen $isSeniorManagingOfficial The Senior Managing Official + * @property bool $isBusinessContact The business contact + * @property bool $isDirector The Director + * @property bool $isUltimateBeneficialOwner The UltimateBeneficial Owner + * @property bool $isSeniorManagingOfficial The Senior Managing Official * @property string $verificationStatus The status of Business user verification * @property string $status The Business user status * @property \DateTime $createdOn The Business user creation date @@ -65,6 +65,10 @@ class BusinessStakeholder extends BaseModel { const GOVERNMENT_ID_TYPE_PASSPORT = 'PASSPORT'; const GOVERNMENT_ID_TYPE_NATIONAL_ID_CARD = 'NATIONAL_ID_CARD'; + /** + * @var mixed|null + */ + private $businessName; public static function FILTERS_ARRAY() { return array('status', 'createdBefore', 'createdAfter', 'sortBy', 'limit'); @@ -102,7 +106,7 @@ public function setToken($token) { /** * Get the BusinessStakeholder Contact * - * @return Boolean + * @return bool */ public function getIsBusinessContact() { return $this->isBusinessContact; @@ -110,7 +114,7 @@ public function getIsBusinessContact() { /** * Set the BusinessStakeholder Contact * - * @param Boolean $isBusinessContact + * @param bool $isBusinessContact * @return BusinessStakeholder */ @@ -122,7 +126,7 @@ public function setIsBusinessContact($isBusinessContact) { /** * Get the BusinessStakeholder Director * - * @return Boolean + * @return bool */ public function getIsDirector() { return $this->isDirector; @@ -131,7 +135,7 @@ public function getIsDirector() { /** * Set the BusinessStakeholder Director * - * @param Boolean $isDirector + * @param bool $isDirector * @return BusinessStakeholder */ @@ -143,7 +147,7 @@ public function setIsDirector($isDirector) { /** * Get the BusinessStakeholder Ultimate Beneficial Owner * - * @return Boolean + * @return bool */ public function getIsUltimateBeneficialOwner() { return $this->isUltimateBeneficialOwner; @@ -152,7 +156,7 @@ public function getIsUltimateBeneficialOwner() { /** * Set the BusinessStakeholder Ultimate Beneficial Owner * - * @param Boolean $isUltimateBeneficialOwner + * @param bool $isUltimateBeneficialOwner * @return BusinessStakeholder */ @@ -164,7 +168,7 @@ public function setIsUltimateBeneficialOwner($isUltimateBeneficialOwner) { /** * Get the BusinessStakeholder Senior Managing Official * - * @return Boolean + * @return bool */ public function getIsSeniorManagingOfficial() { return $this->isSeniorManagingOfficial; @@ -173,7 +177,7 @@ public function getIsSeniorManagingOfficial() { /** * Set the BusinessStakeholder Senior Managing Official * - * @param Boolean $isSeniorManagingOfficial + * @param bool $isSeniorManagingOfficial * @return BusinessStakeholder */ @@ -482,7 +486,7 @@ public function getGovernmentIdType() { /** * Set the business governmentIdType * - * @param string $businessType + * @param string $governmentIdType * @return BusinessStakeholder */ public function setGovernmentIdType($governmentIdType) { From 2a676c2b587216ee56383221c7458ff85a0937aa Mon Sep 17 00:00:00 2001 From: Gustavo Meyer