From 6925d9bc5c6bd86788c3e7ef88b19c524e8d619f Mon Sep 17 00:00:00 2001 From: baibaratsky Date: Wed, 20 Apr 2016 18:12:32 +0300 Subject: [PATCH] Poka-yoke (#91) --- Api/MegaStock/AddMerchant/Request.php | 28 +++++------ Api/MegaStock/CheckMerchant/Request.php | 6 +-- Api/X/Request.php | 4 +- Api/X/X1/Request.php | 66 +++++++++---------------- Api/X/X1/Response.php | 8 +-- Api/X/X11/Request.php | 8 +-- Api/X/X13/Request.php | 2 +- Api/X/X14/Request.php | 12 ++--- Api/X/X14/Response.php | 4 +- Api/X/X15/Get/Request.php | 2 +- Api/X/X17/ContractInfo/Request.php | 4 +- Api/X/X17/CreateContract/Request.php | 6 +-- Api/X/X18/Request.php | 6 +-- Api/X/X19/Request.php | 32 ++++++------ Api/X/X2/Request.php | 24 ++++----- Api/X/X21/TrustConfirm/Request.php | 6 +-- Api/X/X21/TrustRequest/Request.php | 16 +++--- Api/X/X22/Request.php | 44 ++++++++--------- Api/X/X3/Request.php | 10 ++-- Api/X/X4/Invoice.php | 12 ++--- Api/X/X4/Request.php | 6 +-- Api/X/X5/Request.php | 4 +- Api/X/X6/Request.php | 8 +-- Api/X/X8/Request.php | 4 +- Api/X/X9/Request.php | 2 +- 25 files changed, 152 insertions(+), 172 deletions(-) diff --git a/Api/MegaStock/AddMerchant/Request.php b/Api/MegaStock/AddMerchant/Request.php index adcfa85..582ef03 100644 --- a/Api/MegaStock/AddMerchant/Request.php +++ b/Api/MegaStock/AddMerchant/Request.php @@ -179,7 +179,7 @@ public function getIntegratorId() */ public function setIntegratorId($integratorId) { - $this->integratorId = $integratorId; + $this->integratorId = (int)$integratorId; } /** @@ -195,7 +195,7 @@ public function getIntegratorWmid() */ public function setIntegratorWmid($integratorWmid) { - $this->integratorWmid = $integratorWmid; + $this->integratorWmid = (string)$integratorWmid; } /** @@ -211,7 +211,7 @@ public function getBeneficiaryType() */ public function setBeneficiaryType($beneficiaryType) { - $this->beneficiaryType = $beneficiaryType; + $this->beneficiaryType = (int)$beneficiaryType; } /** @@ -227,7 +227,7 @@ public function getBeneficiaryLegalName() */ public function setBeneficiaryLegalName($beneficiaryLegalName) { - $this->beneficiaryLegalName = $beneficiaryLegalName; + $this->beneficiaryLegalName = (string)$beneficiaryLegalName; } /** @@ -243,7 +243,7 @@ public function getBeneficiaryLegalOgrn() */ public function setBeneficiaryLegalOgrn($beneficiaryLegalOgrn) { - $this->beneficiaryLegalOgrn = $beneficiaryLegalOgrn; + $this->beneficiaryLegalOgrn = (int)$beneficiaryLegalOgrn; } /** @@ -259,7 +259,7 @@ public function getBeneficiaryWmid() */ public function setBeneficiaryWmid($beneficiaryWmid) { - $this->beneficiaryWmid = $beneficiaryWmid; + $this->beneficiaryWmid = (string)$beneficiaryWmid; } /** @@ -275,7 +275,7 @@ public function getMerchantUrl() */ public function setMerchantUrl($merchantUrl) { - $this->merchantUrl = $merchantUrl; + $this->merchantUrl = (string)$merchantUrl; } /** @@ -291,7 +291,7 @@ public function getCategoryId() */ public function setCategoryId($categoryId) { - $this->categoryId = $categoryId; + $this->categoryId = (int)$categoryId; } /** @@ -307,7 +307,7 @@ public function getKeywords() */ public function setKeywords($keywords) { - $this->keywords = $keywords; + $this->keywords = (string)$keywords; } /** @@ -323,7 +323,7 @@ public function getLogoUrl() */ public function setLogoUrl($logoUrl) { - $this->logoUrl = $logoUrl; + $this->logoUrl = (string)$logoUrl; } /** @@ -339,7 +339,7 @@ public function getAboutLanguage() */ public function setAboutLanguage($aboutLanguage) { - $this->aboutLanguage = $aboutLanguage; + $this->aboutLanguage = (string)$aboutLanguage; } /** @@ -355,7 +355,7 @@ public function getAboutName() */ public function setAboutName($aboutName) { - $this->aboutName = $aboutName; + $this->aboutName = (string)$aboutName; } /** @@ -371,7 +371,7 @@ public function getAboutDescription() */ public function setAboutDescription($aboutDescription) { - $this->aboutDescription = $aboutDescription; + $this->aboutDescription = (string)$aboutDescription; } /** @@ -387,7 +387,7 @@ public function getMerchantNameInComment() */ public function setMerchantNameInComment($merchantNameInComment) { - $this->merchantNameInComment = $merchantNameInComment; + $this->merchantNameInComment = (string)$merchantNameInComment; } /** diff --git a/Api/MegaStock/CheckMerchant/Request.php b/Api/MegaStock/CheckMerchant/Request.php index ccaea71..6ead17c 100644 --- a/Api/MegaStock/CheckMerchant/Request.php +++ b/Api/MegaStock/CheckMerchant/Request.php @@ -95,7 +95,7 @@ public function getIntegratorId() */ public function setIntegratorId($integratorId) { - $this->integratorId = $integratorId; + $this->integratorId = (int)$integratorId; } /** @@ -111,7 +111,7 @@ public function getIntegratorWmid() */ public function setIntegratorWmid($integratorWmid) { - $this->integratorWmid = $integratorWmid; + $this->integratorWmid = (string)$integratorWmid; } /** @@ -127,6 +127,6 @@ public function getResourceId() */ public function setResourceId($resourceId) { - $this->resourceId = $resourceId; + $this->resourceId = (int)$resourceId; } } diff --git a/Api/X/Request.php b/Api/X/Request.php index b9727a3..506e3b0 100644 --- a/Api/X/Request.php +++ b/Api/X/Request.php @@ -80,7 +80,7 @@ public function getRequestNumber() */ public function setRequestNumber($requestNumber) { - $this->requestNumber = $requestNumber; + $this->requestNumber = (int)$requestNumber; } /** @@ -96,7 +96,7 @@ public function getSignerWmid() */ public function setSignerWmid($signerWmid) { - $this->signerWmid = $signerWmid; + $this->signerWmid = (string)$signerWmid; } /** diff --git a/Api/X/X1/Request.php b/Api/X/X1/Request.php index 75ffa80..d771c53 100644 --- a/Api/X/X1/Request.php +++ b/Api/X/X1/Request.php @@ -139,13 +139,11 @@ public function getOrderId() } /** - * @param $orderId - * - * @return string + * @param string $orderId */ public function setOrderId($orderId) { - $this->orderId = $orderId; + $this->orderId = (string)$orderId; } /** @@ -157,13 +155,11 @@ public function getCustomerWmid() } /** - * @param $customerWmid - * - * @return string + * @param string $customerWmid */ public function setCustomerWmid($customerWmid) { - $this->customerWmid = $customerWmid; + $this->customerWmid = (string)$customerWmid; } /** @@ -175,17 +171,15 @@ public function getPurse() } /** - * @param $purse - * - * @return string + * @param string $purse */ public function setPurse($purse) { - $this->purse = $purse; + $this->purse = (string)$purse; } /** - * @return string + * @return float */ public function getAmount() { @@ -193,17 +187,15 @@ public function getAmount() } /** - * @param $amount - * - * @return string + * @param float $amount */ public function setAmount($amount) { - $this->amount = $amount; + $this->amount = (float)$amount; } /** - * @return float + * @return string */ public function getDescription() { @@ -211,17 +203,15 @@ public function getDescription() } /** - * @param $description - * - * @return float + * @param string $description */ public function setDescription($description) { - $this->description = $description; + $this->description = (string)$description; } /** - * @return float + * @return string */ public function getAddress() { @@ -229,17 +219,15 @@ public function getAddress() } /** - * @param $address - * - * @return float + * @param string $address */ public function setAddress($address) { - $this->address = $address; + $this->address = (string)$address; } /** - * @return string + * @return int */ public function getProtectionPeriod() { @@ -247,13 +235,11 @@ public function getProtectionPeriod() } /** - * @param $protectionPeriod - * - * @return string + * @param int $protectionPeriod */ public function setProtectionPeriod($protectionPeriod) { - $this->protectionPeriod = $protectionPeriod; + $this->protectionPeriod = (int)$protectionPeriod; } /** @@ -265,13 +251,11 @@ public function getExpiration() } /** - * @param $expiration - * - * @return int + * @param int $expiration */ public function setExpiration($expiration) { - $this->expiration = $expiration; + $this->expiration = (int)$expiration; } /** @@ -284,12 +268,10 @@ public function getOnlyAuth() /** * @param bool $onlyAuth - * - * @return bool */ public function setOnlyAuth($onlyAuth) { - $this->onlyAuth = $onlyAuth; + $this->onlyAuth = (bool)$onlyAuth; } /** @@ -301,12 +283,10 @@ public function getShopId() } /** - * @param $shopId - * - * @return int + * @param int $shopId */ public function setShopId($shopId) { - $this->shopId = $shopId; + $this->shopId = (int)$shopId; } } diff --git a/Api/X/X1/Response.php b/Api/X/X1/Response.php index 2b599b1..b91da85 100644 --- a/Api/X/X1/Response.php +++ b/Api/X/X1/Response.php @@ -122,7 +122,7 @@ public function getPurse() } /** - * @return string + * @return float */ public function getAmount() { @@ -130,7 +130,7 @@ public function getAmount() } /** - * @return float + * @return string */ public function getDescription() { @@ -138,7 +138,7 @@ public function getDescription() } /** - * @return float + * @return string */ public function getAddress() { @@ -146,7 +146,7 @@ public function getAddress() } /** - * @return string + * @return int */ public function getProtectionPeriod() { diff --git a/Api/X/X11/Request.php b/Api/X/X11/Request.php index 69611a3..001be22 100644 --- a/Api/X/X11/Request.php +++ b/Api/X/X11/Request.php @@ -121,7 +121,7 @@ public function getPassportWmid() */ public function setPassportWmid($passportWmid) { - $this->passportWmid = $passportWmid; + $this->passportWmid = (string)$passportWmid; } /** @@ -137,7 +137,7 @@ public function getParamDict() */ public function setParamDict($paramDict) { - $this->paramDict = $paramDict; + $this->paramDict = (int)$paramDict; } /** @@ -153,7 +153,7 @@ public function getParamInfo() */ public function setParamInfo($paramInfo) { - $this->paramInfo = $paramInfo; + $this->paramInfo = (int)$paramInfo; } /** @@ -169,6 +169,6 @@ public function getParamMode() */ public function setParamMode($paramMode) { - $this->paramMode = $paramMode; + $this->paramMode = (int)$paramMode; } } diff --git a/Api/X/X13/Request.php b/Api/X/X13/Request.php index 012ac1b..e62ebe8 100644 --- a/Api/X/X13/Request.php +++ b/Api/X/X13/Request.php @@ -97,6 +97,6 @@ public function getTransactionId() */ public function setTransactionId($transactionId) { - $this->transactionId = $transactionId; + $this->transactionId = (string)$transactionId; } } diff --git a/Api/X/X14/Request.php b/Api/X/X14/Request.php index 642b511..e431369 100644 --- a/Api/X/X14/Request.php +++ b/Api/X/X14/Request.php @@ -14,7 +14,7 @@ */ class Request extends X\Request { - /** @var int trans\inwmtranid */ + /** @var string trans\inwmtranid */ protected $transactionId; /** @var float trans\amount */ @@ -94,15 +94,15 @@ public function sign(Signer $requestSigner = null) } /** - * @param int $transactionId + * @param string $transactionId */ public function setTransactionId($transactionId) { - $this->transactionId = $transactionId; + $this->transactionId = (string)$transactionId; } /** - * @return int + * @return string */ public function getTransactionId() { @@ -130,7 +130,7 @@ public function getAmount() */ public function setPhone($phone) { - $this->phone = $phone; + $this->phone = (string)$phone; } /** @@ -146,7 +146,7 @@ public function getPhone() */ public function setCapitallerPurse($capitallerPurse) { - $this->capitallerPurse = $capitallerPurse; + $this->capitallerPurse = (string)$capitallerPurse; } /** diff --git a/Api/X/X14/Response.php b/Api/X/X14/Response.php index d4d5ef7..cbf2949 100644 --- a/Api/X/X14/Response.php +++ b/Api/X/X14/Response.php @@ -35,7 +35,7 @@ class Response extends AbstractResponse /** @var float operation\comiss */ protected $fee; - /** @var float operation\desc */ + /** @var string operation\desc */ protected $description; /** @var \DateTime operation/datecrt */ @@ -84,7 +84,7 @@ public function getCreateDateTime() } /** - * @return float + * @return string */ public function getDescription() { diff --git a/Api/X/X15/Get/Request.php b/Api/X/X15/Get/Request.php index 67e5d45..45abd9c 100644 --- a/Api/X/X15/Get/Request.php +++ b/Api/X/X15/Get/Request.php @@ -107,6 +107,6 @@ public function getRequestedWmid() */ public function setRequestedWmid($requestedWmid) { - $this->requestedWmid = $requestedWmid; + $this->requestedWmid = (string)$requestedWmid; } } diff --git a/Api/X/X17/ContractInfo/Request.php b/Api/X/X17/ContractInfo/Request.php index e7baabb..be06fe6 100644 --- a/Api/X/X17/ContractInfo/Request.php +++ b/Api/X/X17/ContractInfo/Request.php @@ -97,7 +97,7 @@ public function getContractId() */ public function setContractId($contractId) { - $this->contractId = $contractId; + $this->contractId = (int)$contractId; } /** @@ -113,6 +113,6 @@ public function getType() */ public function setType($type) { - $this->type = $type; + $this->type = (string)$type; } } diff --git a/Api/X/X17/CreateContract/Request.php b/Api/X/X17/CreateContract/Request.php index 370efd0..0188787 100644 --- a/Api/X/X17/CreateContract/Request.php +++ b/Api/X/X17/CreateContract/Request.php @@ -113,7 +113,7 @@ public function getContractName() */ public function setContractName($contractName) { - $this->contractName = $contractName; + $this->contractName = (string)$contractName; } /** @@ -129,7 +129,7 @@ public function getContractType() */ public function setContractType($contractType) { - $this->contractType = $contractType; + $this->contractType = (int)$contractType; } /** @@ -145,7 +145,7 @@ public function getContractText() */ public function setContractText($contractText) { - $this->contractText = $contractText; + $this->contractText = (string)$contractText; } /** diff --git a/Api/X/X18/Request.php b/Api/X/X18/Request.php index b51bd8b..8c1a04d 100644 --- a/Api/X/X18/Request.php +++ b/Api/X/X18/Request.php @@ -128,7 +128,7 @@ public function sign(Signer $requestSigner = null) */ public function setPayeePurse($payeePurse) { - $this->payeePurse = $payeePurse; + $this->payeePurse = (string)$payeePurse; } /** @@ -144,7 +144,7 @@ public function getPayeePurse() */ public function setPaymentNumber($paymentNumber) { - $this->paymentNumber = $paymentNumber; + $this->paymentNumber = (string)$paymentNumber; } /** @@ -160,7 +160,7 @@ public function getPaymentNumber() */ public function setPaymentNumberType($paymentNumberType) { - $this->paymentNumberType = $paymentNumberType; + $this->paymentNumberType = (int)$paymentNumberType; } /** diff --git a/Api/X/X19/Request.php b/Api/X/X19/Request.php index 082000b..863a892 100644 --- a/Api/X/X19/Request.php +++ b/Api/X/X19/Request.php @@ -226,7 +226,7 @@ public function getLanguage() */ public function setLanguage($language) { - $this->language = $language; + $this->language = (string)$language; } /** @@ -242,7 +242,7 @@ public function getOperationType() */ public function setOperationType($operationType) { - $this->operationType = $operationType; + $this->operationType = (int)$operationType; } /** @@ -258,7 +258,7 @@ public function getOperationDirection() */ public function setOperationDirection($operationDirection) { - $this->operationDirection = $operationDirection; + $this->operationDirection = (int)$operationDirection; } /** @@ -274,7 +274,7 @@ public function getOperationPurseType() */ public function setOperationPurseType($operationPurseType) { - $this->operationPurseType = $operationPurseType; + $this->operationPurseType = (string)$operationPurseType; } /** @@ -290,7 +290,7 @@ public function getOperationAmount() */ public function setOperationAmount($operationAmount) { - $this->operationAmount = $operationAmount; + $this->operationAmount = (float)$operationAmount; } /** @@ -306,7 +306,7 @@ public function getOrderId() */ public function setOrderId($orderId) { - $this->orderId = $orderId; + $this->orderId = (int)$orderId; } /** @@ -322,7 +322,7 @@ public function getUserWmid() */ public function setUserWmid($userWmid) { - $this->userWmid = $userWmid; + $this->userWmid = (string)$userWmid; } /** @@ -338,7 +338,7 @@ public function getUserPassportNum() */ public function setUserPassportNum($userPassportNum) { - $this->userPassportNum = $userPassportNum; + $this->userPassportNum = (string)$userPassportNum; } /** @@ -354,7 +354,7 @@ public function getUserLastName() */ public function setUserLastName($userLastName) { - $this->userLastName = $userLastName; + $this->userLastName = (string)$userLastName; } /** @@ -370,7 +370,7 @@ public function getUserFirstName() */ public function setUserFirstName($userFirstName) { - $this->userFirstName = $userFirstName; + $this->userFirstName = (string)$userFirstName; } /** @@ -386,7 +386,7 @@ public function getUserBankName() */ public function setUserBankName($userBankName) { - $this->userBankName = $userBankName; + $this->userBankName = (string)$userBankName; } /** @@ -402,7 +402,7 @@ public function getUserBankAccount() */ public function setUserBankAccount($userBankAccount) { - $this->userBankAccount = $userBankAccount; + $this->userBankAccount = (string)$userBankAccount; } /** @@ -418,7 +418,7 @@ public function getUserCardNumber() */ public function setUserCardNumber($userCardNumber) { - $this->userCardNumber = $userCardNumber; + $this->userCardNumber = (string)$userCardNumber; } /** @@ -434,7 +434,7 @@ public function getUserEMoneyName() */ public function setUserEMoneyName($userEMoneyName) { - $this->userEMoneyName = $userEMoneyName; + $this->userEMoneyName = (string)$userEMoneyName; } /** @@ -450,7 +450,7 @@ public function getUserEMoneyId() */ public function setUserEMoneyId($userEMoneyId) { - $this->userEMoneyId = $userEMoneyId; + $this->userEMoneyId = (string)$userEMoneyId; } /** @@ -466,6 +466,6 @@ public function getUserPhone() */ public function setUserPhone($userPhone) { - $this->userPhone = $userPhone; + $this->userPhone = (string)$userPhone; } } diff --git a/Api/X/X2/Request.php b/Api/X/X2/Request.php index 484ad52..4384682 100644 --- a/Api/X/X2/Request.php +++ b/Api/X/X2/Request.php @@ -38,7 +38,7 @@ class Request extends X\Request /** @var int trans/wminvid */ protected $invoiceId = 0; - /** @var boolean trans/onlyauth */ + /** @var bool trans/onlyauth */ protected $onlyAuth = true; /** @@ -147,7 +147,7 @@ public function getTransactionExternalId() */ public function setTransactionExternalId($transactionExternalId) { - $this->transactionExternalId = $transactionExternalId; + $this->transactionExternalId = (int)$transactionExternalId; } /** @@ -163,7 +163,7 @@ public function getPayerPurse() */ public function setPayerPurse($payerPurse) { - $this->payerPurse = $payerPurse; + $this->payerPurse = (string)$payerPurse; } /** @@ -179,7 +179,7 @@ public function getPayeePurse() */ public function setPayeePurse($payeePurse) { - $this->payeePurse = $payeePurse; + $this->payeePurse = (string)$payeePurse; } /** @@ -195,7 +195,7 @@ public function getAmount() */ public function setAmount($amount) { - $this->amount = $amount; + $this->amount = (float)$amount; } /** @@ -211,7 +211,7 @@ public function getProtectionPeriod() */ public function setProtectionPeriod($protectionPeriod) { - $this->protectionPeriod = $protectionPeriod; + $this->protectionPeriod = (int)$protectionPeriod; } /** @@ -227,7 +227,7 @@ public function getProtectionCode() */ public function setProtectionCode($protectionCode) { - $this->protectionCode = $protectionCode; + $this->protectionCode = (string)$protectionCode; } /** @@ -243,7 +243,7 @@ public function getDescription() */ public function setDescription($description) { - $this->description = $description; + $this->description = (string)$description; } /** @@ -259,11 +259,11 @@ public function getInvoiceId() */ public function setInvoiceId($invoiceId) { - $this->invoiceId = $invoiceId; + $this->invoiceId = (int)$invoiceId; } /** - * @return boolean + * @return bool */ public function getOnlyAuth() { @@ -271,10 +271,10 @@ public function getOnlyAuth() } /** - * @param boolean $onlyAuth + * @param bool $onlyAuth */ public function setOnlyAuth($onlyAuth) { - $this->onlyAuth = $onlyAuth; + $this->onlyAuth = (bool)$onlyAuth; } } diff --git a/Api/X/X21/TrustConfirm/Request.php b/Api/X/X21/TrustConfirm/Request.php index ae027bd..1178001 100644 --- a/Api/X/X21/TrustConfirm/Request.php +++ b/Api/X/X21/TrustConfirm/Request.php @@ -120,7 +120,7 @@ public function getRequestId() */ public function setRequestId($requestId) { - $this->requestId = $requestId; + $this->requestId = (int)$requestId; } /** @@ -136,7 +136,7 @@ public function getConfirmationCode() */ public function setConfirmationCode($confirmationCode) { - $this->confirmationCode = $confirmationCode; + $this->confirmationCode = (string)$confirmationCode; } /** @@ -152,6 +152,6 @@ public function getLanguage() */ public function setLanguage($language) { - $this->language = $language; + $this->language = (string)$language; } } diff --git a/Api/X/X21/TrustRequest/Request.php b/Api/X/X21/TrustRequest/Request.php index cc07635..0ac9fb6 100644 --- a/Api/X/X21/TrustRequest/Request.php +++ b/Api/X/X21/TrustRequest/Request.php @@ -162,7 +162,7 @@ public function getPayeePurse() */ public function setPayeePurse($payeePurse) { - $this->payeePurse = $payeePurse; + $this->payeePurse = (string)$payeePurse; } /** @@ -178,7 +178,7 @@ public function getDayLimit() */ public function setDayLimit($dayLimit) { - $this->dayLimit = $dayLimit; + $this->dayLimit = (float)$dayLimit; } /** @@ -194,7 +194,7 @@ public function getWeekLimit() */ public function setWeekLimit($weekLimit) { - $this->weekLimit = $weekLimit; + $this->weekLimit = (float)$weekLimit; } /** @@ -210,7 +210,7 @@ public function getMonthLimit() */ public function setMonthLimit($monthLimit) { - $this->monthLimit = $monthLimit; + $this->monthLimit = (float)$monthLimit; } /** @@ -226,7 +226,7 @@ public function getClientNumber() */ public function setClientNumber($clientNumber) { - $this->clientNumber = $clientNumber; + $this->clientNumber = (string)$clientNumber; } /** @@ -242,7 +242,7 @@ public function getClientNumberType() */ public function setClientNumberType($clientNumberType) { - $this->clientNumberType = $clientNumberType; + $this->clientNumberType = (int)$clientNumberType; } /** @@ -258,7 +258,7 @@ public function getSmsType() */ public function setSmsType($smsType) { - $this->smsType = $smsType; + $this->smsType = (int)$smsType; } /** @@ -274,6 +274,6 @@ public function getLanguage() */ public function setLanguage($language) { - $this->language = $language; + $this->language = (string)$language; } } diff --git a/Api/X/X22/Request.php b/Api/X/X22/Request.php index 9ff7a83..0b04c80 100644 --- a/Api/X/X22/Request.php +++ b/Api/X/X22/Request.php @@ -263,7 +263,7 @@ public function getValidityPeriodInHours() */ public function setValidityPeriodInHours($validityPeriodInHours) { - $this->validityPeriodInHours = $validityPeriodInHours; + $this->validityPeriodInHours = (int)$validityPeriodInHours; } /** @@ -279,7 +279,7 @@ public function getPayeePurse() */ public function setPayeePurse($payeePurse) { - $this->payeePurse = $payeePurse; + $this->payeePurse = (int)$payeePurse; } /** @@ -295,7 +295,7 @@ public function getPaymentAmount() */ public function setPaymentAmount($paymentAmount) { - $this->paymentAmount = $paymentAmount; + $this->paymentAmount = (float)$paymentAmount; } /** @@ -311,7 +311,7 @@ public function getPaymentNumber() */ public function setPaymentNumber($paymentNumber) { - $this->paymentNumber = $paymentNumber; + $this->paymentNumber = (int)$paymentNumber; } /** @@ -327,7 +327,7 @@ public function getPaymentDescription() */ public function setPaymentDescription($paymentDescription) { - $this->paymentDescription = $paymentDescription; + $this->paymentDescription = (string)$paymentDescription; } /** @@ -343,7 +343,7 @@ public function getSimMode() */ public function setSimMode($simMode) { - $this->simMode = $simMode; + $this->simMode = (int)$simMode; } /** @@ -359,7 +359,7 @@ public function getResultUrl() */ public function setResultUrl($resultUrl) { - $this->resultUrl = $resultUrl; + $this->resultUrl = (string)$resultUrl; } /** @@ -375,7 +375,7 @@ public function getSuccessUrl() */ public function setSuccessUrl($successUrl) { - $this->successUrl = $successUrl; + $this->successUrl = (string)$successUrl; } /** @@ -391,7 +391,7 @@ public function getSuccessMethod() */ public function setSuccessMethod($successMethod) { - $this->successMethod = $successMethod; + $this->successMethod = (int)$successMethod; } /** @@ -407,7 +407,7 @@ public function getFailUrl() */ public function setFailUrl($failUrl) { - $this->failUrl = $failUrl; + $this->failUrl = (string)$failUrl; } /** @@ -419,11 +419,11 @@ public function getFailMethod() } /** - * @param string $failMethod lmi_fail_method + * @param int $failMethod lmi_fail_method */ public function setFailMethod($failMethod) { - $this->failMethod = $failMethod; + $this->failMethod = (int)$failMethod; } /** @@ -439,7 +439,7 @@ public function getPaymerPinNumberInside() */ public function setPaymerPinNumberInside($paymerPinNumberInside) { - $this->paymerPinNumberInside = $paymerPinNumberInside; + $this->paymerPinNumberInside = (string)$paymerPinNumberInside; } /** @@ -455,7 +455,7 @@ public function getWmNotePinNumberInside() */ public function setWmNotePinNumberInside($wmNotePinNumberInside) { - $this->wmNotePinNumberInside = $wmNotePinNumberInside; + $this->wmNotePinNumberInside = (string)$wmNotePinNumberInside; } /** @@ -471,7 +471,7 @@ public function getPaymerEmail() */ public function setPaymerEmail($paymerEmail) { - $this->paymerEmail = $paymerEmail; + $this->paymerEmail = (string)$paymerEmail; } /** @@ -487,7 +487,7 @@ public function getWmCheckNumberInside() */ public function setWmCheckNumberInside($wmCheckNumberInside) { - $this->wmCheckNumberInside = $wmCheckNumberInside; + $this->wmCheckNumberInside = (string)$wmCheckNumberInside; } /** @@ -503,7 +503,7 @@ public function getWmCheckCodeInside() */ public function setWmCheckCodeInside($wmCheckCodeInside) { - $this->wmCheckCodeInside = $wmCheckCodeInside; + $this->wmCheckCodeInside = (string)$wmCheckCodeInside; } /** @@ -519,7 +519,7 @@ public function getAllowSdp() */ public function setAllowSdp($allowSdp) { - $this->allowSdp = $allowSdp; + $this->allowSdp = (int)$allowSdp; } /** @@ -535,7 +535,7 @@ public function getFastPhoneNumber() */ public function setFastPhoneNumber($fastPhoneNumber) { - $this->fastPhoneNumber = $fastPhoneNumber; + $this->fastPhoneNumber = (int)$fastPhoneNumber; } /** @@ -551,7 +551,7 @@ public function getPaymentCreditDays() */ public function setPaymentCreditDays($paymentCreditDays) { - $this->paymentCreditDays = $paymentCreditDays; + $this->paymentCreditDays = (int)$paymentCreditDays; } /** @@ -567,7 +567,7 @@ public function getShopId() */ public function setShopId($shopId) { - $this->shopId = $shopId; + $this->shopId = (int)$shopId; } /** @@ -615,6 +615,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - $this->paymentMethod = $paymentMethod; + $this->paymentMethod = (string)$paymentMethod; } } diff --git a/Api/X/X3/Request.php b/Api/X/X3/Request.php index 5aa234f..08c4eb6 100644 --- a/Api/X/X3/Request.php +++ b/Api/X/X3/Request.php @@ -113,7 +113,7 @@ public function sign(Signer $requestSigner = null) */ public function setPurse($purse) { - $this->purse = $purse; + $this->purse = (string)$purse; } /** @@ -129,7 +129,7 @@ public function getPurse() */ public function setTransactionId($transactionId) { - $this->transactionId = $transactionId; + $this->transactionId = (int)$transactionId; } /** @@ -145,7 +145,7 @@ public function getTransactionId() */ public function setTransactionExternalId($transactionExternalId) { - $this->transactionExternalId = $transactionExternalId; + $this->transactionExternalId = (int)$transactionExternalId; } /** @@ -161,7 +161,7 @@ public function getTransactionExternalId() */ public function setOrderId($orderId) { - $this->orderId = $orderId; + $this->orderId = (int)$orderId; } /** @@ -195,7 +195,7 @@ public function getExternalInvoiceId() */ public function setInvoiceId($invoiceId) { - $this->invoiceId = $invoiceId; + $this->invoiceId = (int)$invoiceId; } /** diff --git a/Api/X/X4/Invoice.php b/Api/X/X4/Invoice.php index 8da130e..1fd7f12 100644 --- a/Api/X/X4/Invoice.php +++ b/Api/X/X4/Invoice.php @@ -12,13 +12,13 @@ class Invoice /** @var int @id */ protected $id; - /** @var int orderid */ + /** @var string orderid */ protected $orderId; /** @var string customerwmid */ protected $customerWmid; - /** @var float storepurse */ + /** @var string storepurse */ protected $purse; /** @var float amount */ @@ -103,7 +103,7 @@ public function getPurse() } /** - * @return string + * @return float */ public function getAmount() { @@ -111,7 +111,7 @@ public function getAmount() } /** - * @return float + * @return string */ public function getDescription() { @@ -119,7 +119,7 @@ public function getDescription() } /** - * @return float + * @return string */ public function getAddress() { @@ -127,7 +127,7 @@ public function getAddress() } /** - * @return string + * @return int */ public function getProtectionPeriod() { diff --git a/Api/X/X4/Request.php b/Api/X/X4/Request.php index 69647a9..a458562 100644 --- a/Api/X/X4/Request.php +++ b/Api/X/X4/Request.php @@ -97,11 +97,11 @@ public function getData() } /** - * @param $purse + * @param string $purse */ public function setPurse($purse) { - $this->purse = $purse; + $this->purse = (string)$purse; } /** @@ -117,7 +117,7 @@ public function getPurse() */ public function setInvoiceId($invoiceId) { - $this->invoiceId = $invoiceId; + $this->invoiceId = (int)$invoiceId; } /** diff --git a/Api/X/X5/Request.php b/Api/X/X5/Request.php index 07fbec3..fc0a3f7 100644 --- a/Api/X/X5/Request.php +++ b/Api/X/X5/Request.php @@ -101,7 +101,7 @@ public function getTransactionId() */ public function setTransactionId($transactionId) { - $this->transactionId = $transactionId; + $this->transactionId = (string)$transactionId; } /** @@ -117,6 +117,6 @@ public function getProtectionCode() */ public function setProtectionCode($protectionCode) { - $this->protectionCode = $protectionCode; + $this->protectionCode = (string)$protectionCode; } } diff --git a/Api/X/X6/Request.php b/Api/X/X6/Request.php index fc793c5..396aaa1 100644 --- a/Api/X/X6/Request.php +++ b/Api/X/X6/Request.php @@ -118,7 +118,7 @@ public function getMessageRecipientWmid() */ public function setMessageRecipientWmid($messageRecipientWmid) { - $this->messageRecipientWmid = $messageRecipientWmid; + $this->messageRecipientWmid = (string)$messageRecipientWmid; } /** @@ -134,7 +134,7 @@ public function getMessageSubject() */ public function setMessageSubject($messageSubject) { - $this->messageSubject = $messageSubject; + $this->messageSubject = (string)$messageSubject; } /** @@ -150,7 +150,7 @@ public function getMessageText() */ public function setMessageText($messageText) { - $this->messageText = $messageText; + $this->messageText = (string)$messageText; } /** @@ -166,6 +166,6 @@ public function getMessageOnlyAuth() */ public function setMessageOnlyAuth($messageOnlyAuth) { - $this->messageOnlyAuth = $messageOnlyAuth; + $this->messageOnlyAuth = (int)$messageOnlyAuth; } } diff --git a/Api/X/X8/Request.php b/Api/X/X8/Request.php index d22ea60..951bfeb 100644 --- a/Api/X/X8/Request.php +++ b/Api/X/X8/Request.php @@ -96,7 +96,7 @@ public function sign(Signer $requestSigner = null) */ public function setWmid($wmid) { - $this->wmid = $wmid; + $this->wmid = (string)$wmid; } /** @@ -112,7 +112,7 @@ public function getWmid() */ public function setPurse($testPurse) { - $this->purse = $testPurse; + $this->purse = (string)$testPurse; } /** diff --git a/Api/X/X9/Request.php b/Api/X/X9/Request.php index 18e076d..6011bc2 100644 --- a/Api/X/X9/Request.php +++ b/Api/X/X9/Request.php @@ -97,6 +97,6 @@ public function getRequestedWmid() */ public function setRequestedWmid($requestedWmid) { - $this->requestedWmid = $requestedWmid; + $this->requestedWmid = (string)$requestedWmid; } }