Skip to content

Commit 3262e9e

Browse files
Added null type declaration for reset parameters
1 parent 48de326 commit 3262e9e

10 files changed

+65
-65
lines changed

src/Concerns/Parameters.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public function getAccessKey(): ?string
2626
/**
2727
* Thiết lập access key do MoMo cấp.
2828
*
29-
* @param string $key
29+
* @param null|string $key
3030
* @return $this
3131
*/
32-
public function setAccessKey(string $key)
32+
public function setAccessKey(?string $key)
3333
{
3434
return $this->setParameter('accessKey', $key);
3535
}
@@ -47,10 +47,10 @@ public function getSecretKey(): ?string
4747
/**
4848
* Thiết lập secret key do MoMo cấp.
4949
*
50-
* @param string $key
50+
* @param null|string $key
5151
* @return $this
5252
*/
53-
public function setSecretKey(string $key)
53+
public function setSecretKey(?string $key)
5454
{
5555
return $this->setParameter('secretKey', $key);
5656
}
@@ -68,10 +68,10 @@ public function getPartnerCode(): ?string
6868
/**
6969
* Thiết lập partner code do MoMo cấp.
7070
*
71-
* @param string $code
71+
* @param null|string $code
7272
* @return $this
7373
*/
74-
public function setPartnerCode(string $code)
74+
public function setPartnerCode(?string $code)
7575
{
7676
return $this->setParameter('partnerCode', $code);
7777
}
@@ -89,10 +89,10 @@ public function getPublicKey(): ?string
8989
/**
9090
* Thiết lập public key do MoMo cấp.
9191
*
92-
* @param string $key
92+
* @param null|string $key
9393
* @return $this
9494
*/
95-
public function setPublicKey(string $key)
95+
public function setPublicKey(?string $key)
9696
{
9797
return $this->setParameter('publicKey', $key);
9898
}

src/Message/AllInOne/AbstractSignatureRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function getOrderId(): ?string
3535
/**
3636
* Thiết lập id đơn hàng.
3737
*
38-
* @param string $id
38+
* @param null|string $id
3939
* @return $this
4040
*/
41-
public function setOrderId(string $id)
41+
public function setOrderId(?string $id)
4242
{
4343
return $this->setParameter('orderId', $id);
4444
}
@@ -56,10 +56,10 @@ public function getRequestId(): ?string
5656
/**
5757
* Thiết lập request id của đơn hàng.
5858
*
59-
* @param string $id
59+
* @param null|string $id
6060
* @return $this
6161
*/
62-
public function setRequestId(string $id)
62+
public function setRequestId(?string $id)
6363
{
6464
return $this->setParameter('requestId', $id);
6565
}

src/Message/AllInOne/PurchaseRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public function getExtraData(): ?string
4646
/**
4747
* Thiết lập dữ liệu kèm theo đơn hàng.
4848
*
49-
* @param string $data
49+
* @param null|string $data
5050
* @return $this
5151
*/
52-
public function setExtraData(string $data)
52+
public function setExtraData(?string $data)
5353
{
5454
return $this->setParameter('extraData', $data);
5555
}
@@ -67,10 +67,10 @@ public function getOrderInfo(): ?string
6767
/**
6868
* Thiết lập thông tin đơn hàng.
6969
*
70-
* @param string $info
70+
* @param null|string $info
7171
* @return $this
7272
*/
73-
public function setOrderInfo(string $info)
73+
public function setOrderInfo(?string $info)
7474
{
7575
return $this->setParameter('orderInfo', $info);
7676
}

src/Message/AllInOne/RefundRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function getTransId(): ?string
6060
/**
6161
* Thiết lập mã giao dịch của MoMo.
6262
*
63-
* @param string $id
63+
* @param null|string $id
6464
* @return $this
6565
*/
66-
public function setTransId(string $id)
66+
public function setTransId(?string $id)
6767
{
6868
return $this->setParameter('transId', $id);
6969
}

src/Message/AppInApp/PurchaseRequest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public function getAppData(): ?string
6363
/**
6464
* Thiết app token từ app MoMo gửi sang.
6565
*
66-
* @param string $appData
66+
* @param null|string $appData
6767
* @return $this
6868
*/
69-
public function setAppData(string $appData)
69+
public function setAppData(?string $appData)
7070
{
7171
return $this->setParameter('appData', $appData);
7272
}
@@ -84,10 +84,10 @@ public function getStoreId(): ?string
8484
/**
8585
* Thiết lập mã cửa hàng.
8686
*
87-
* @param string $id
87+
* @param null|string $id
8888
* @return $this
8989
*/
90-
public function setStoreId(string $id)
90+
public function setStoreId(?string $id)
9191
{
9292
return $this->setParameter('storeId', $id);
9393
}
@@ -105,10 +105,10 @@ public function getStoreName(): ?string
105105
/**
106106
* Thiết lập tên cửa hàng.
107107
*
108-
* @param string $name
108+
* @param null|string $name
109109
* @return $this
110110
*/
111-
public function setStoreName(string $name)
111+
public function setStoreName(?string $name)
112112
{
113113
return $this->setParameter('storeName', $name);
114114
}
@@ -126,10 +126,10 @@ public function getPartnerRefId(): ?string
126126
/**
127127
* Thiết lập mã đơn hàng.
128128
*
129-
* @param string $id
129+
* @param null|string $id
130130
* @return $this
131131
*/
132-
public function setPartnerRefId(string $id)
132+
public function setPartnerRefId(?string $id)
133133
{
134134
return $this->setParameter('partnerRefId', $id);
135135
}
@@ -147,10 +147,10 @@ public function getPartnerTransId(): ?string
147147
/**
148148
* Thiết lập mã đơn hàng bổ sung.
149149
*
150-
* @param string $id
150+
* @param null|string $id
151151
* @return $this
152152
*/
153-
public function setPartnerTransId(string $id)
153+
public function setPartnerTransId(?string $id)
154154
{
155155
return $this->setParameter('partnerTransId', $id);
156156
}
@@ -168,10 +168,10 @@ public function getPartnerName(): ?string
168168
/**
169169
* Thiết lập tên công ty, tổ chức của bạn.
170170
*
171-
* @param string $name
171+
* @param null|string $name
172172
* @return $this
173173
*/
174-
public function setPartnerName(string $name)
174+
public function setPartnerName(?string $name)
175175
{
176176
return $this->setParameter('partnerName', $name);
177177
}
@@ -189,10 +189,10 @@ public function getCustomerNumber(): ?string
189189
/**
190190
* Thiết lập số điện thoại khách hàng.
191191
*
192-
* @param string $number
192+
* @param null|string $number
193193
* @return $this
194194
*/
195-
public function setCustomerNumber(string $number)
195+
public function setCustomerNumber(?string $number)
196196
{
197197
return $this->setParameter('customerNumber', $number);
198198
}

src/Message/POS/PurchaseRequest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public function getStoreId(): ?string
6666
/**
6767
* Thiết lập mã cửa hàng.
6868
*
69-
* @param string $id
69+
* @param null|string $id
7070
* @return $this
7171
*/
72-
public function setStoreId(string $id)
72+
public function setStoreId(?string $id)
7373
{
7474
return $this->setParameter('storeId', $id);
7575
}
@@ -87,10 +87,10 @@ public function getStoreName(): ?string
8787
/**
8888
* Thiết lập tên cửa hàng.
8989
*
90-
* @param string $name
90+
* @param null|string $name
9191
* @return $this
9292
*/
93-
public function setStoreName(string $name)
93+
public function setStoreName(?string $name)
9494
{
9595
return $this->setParameter('storeName', $name);
9696
}
@@ -108,10 +108,10 @@ public function getPartnerRefId(): ?string
108108
/**
109109
* Thiết lập mã đơn hàng.
110110
*
111-
* @param string $id
111+
* @param null|string $id
112112
* @return $this
113113
*/
114-
public function setPartnerRefId(string $id)
114+
public function setPartnerRefId(?string $id)
115115
{
116116
return $this->setParameter('partnerRefId', $id);
117117
}
@@ -129,10 +129,10 @@ public function getPaymentCode(): ?string
129129
/**
130130
* Thiết lập mã khách thanh toán.
131131
*
132-
* @param string $code
132+
* @param null|string $code
133133
* @return $this
134134
*/
135-
public function setPaymentCode(string $code)
135+
public function setPaymentCode(?string $code)
136136
{
137137
return $this->setParameter('paymentCode', $code);
138138
}

src/Message/PayConfirmRequest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public function getRequestId(): ?string
4444
/**
4545
* Thiết lập request id của đơn hàng.
4646
*
47-
* @param string $id
47+
* @param null|string $id
4848
* @return $this
4949
*/
50-
public function setRequestId(string $id)
50+
public function setRequestId(?string $id)
5151
{
5252
return $this->setParameter('requestId', $id);
5353
}
@@ -65,10 +65,10 @@ public function getPartnerRefId(): ?string
6565
/**
6666
* Thiết lập mã đơn hàng.
6767
*
68-
* @param string $id
68+
* @param null|string $id
6969
* @return $this
7070
*/
71-
public function setPartnerRefId(string $id)
71+
public function setPartnerRefId(?string $id)
7272
{
7373
return $this->setParameter('partnerRefId', $id);
7474
}
@@ -86,10 +86,10 @@ public function getMomoTransId(): ?string
8686
/**
8787
* Thiết lập mã giao dịch của MoMo.
8888
*
89-
* @param string $id
89+
* @param null|string $id
9090
* @return $this
9191
*/
92-
public function setMomoTransId(string $id)
92+
public function setMomoTransId(?string $id)
9393
{
9494
return $this->setParameter('momoTransId', $id);
9595
}
@@ -107,10 +107,10 @@ public function getCustomerNumber(): ?string
107107
/**
108108
* Thiết lập số điện thoại khách hàng.
109109
*
110-
* @param string $number
110+
* @param null|string $number
111111
* @return $this
112112
*/
113-
public function setCustomerNumber(string $number)
113+
public function setCustomerNumber(?string $number)
114114
{
115115
return $this->setParameter('customerNumber', $number);
116116
}
@@ -128,10 +128,10 @@ public function getRequestType(): ?string
128128
/**
129129
* Thiết lập loại request type yêu cầu MoMo, commit hoặc rollback.
130130
*
131-
* @param string $type
131+
* @param null|string $type
132132
* @return $this
133133
*/
134-
public function setRequestType(string $type)
134+
public function setRequestType(?string $type)
135135
{
136136
return $this->setParameter('requestType', $type);
137137
}

src/Message/PayQueryStatusRequest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public function getRequestId(): ?string
5050
/**
5151
* Thiết lập request id của đơn hàng.
5252
*
53-
* @param string $id
53+
* @param null|string $id
5454
* @return $this
5555
*/
56-
public function setRequestId(string $id)
56+
public function setRequestId(?string $id)
5757
{
5858
return $this->setParameter('requestId', $id);
5959
}
@@ -71,10 +71,10 @@ public function getPartnerRefId(): ?string
7171
/**
7272
* Thiết lập mã đơn hàng.
7373
*
74-
* @param string $id
74+
* @param null|string $id
7575
* @return $this
7676
*/
77-
public function setPartnerRefId(string $id)
77+
public function setPartnerRefId(?string $id)
7878
{
7979
return $this->setParameter('partnerRefId', $id);
8080
}
@@ -92,10 +92,10 @@ public function getMomoTransId(): ?string
9292
/**
9393
* Thiết lập mã giao dịch của MoMo.
9494
*
95-
* @param string $id
95+
* @param null|string $id
9696
* @return $this
9797
*/
98-
public function setMomoTransId(string $id)
98+
public function setMomoTransId(?string $id)
9999
{
100100
return $this->setParameter('momoTransId', $id);
101101
}

0 commit comments

Comments
 (0)