Skip to content

Commit 4ed9695

Browse files
getsolarisgithub-actions[bot]
authored andcommitted
style: fix psr-12 code style issues
1 parent c188bff commit 4ed9695

17 files changed

+43
-262
lines changed

src/Attributes/Billing.php

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,25 @@
1111
class Billing extends TossPayments implements AttributeInterface
1212
{
1313
protected string $uri;
14+
1415
protected string $customerKey;
16+
1517
protected string $cardNumber;
18+
1619
protected string $cardExpirationYear;
20+
1721
protected string $cardExpirationMonth;
22+
1823
protected string $customerIdentityNumber;
24+
1925
protected string $authKey;
26+
2027
protected string $billingKey;
28+
2129
protected int $amount;
30+
2231
protected string $orderName;
32+
2333
protected string $orderId;
2434

2535
public function __construct()
@@ -38,22 +48,16 @@ public function initializeUri(): static
3848
return $this;
3949
}
4050

41-
/**
42-
* @param string|null $endpoint
43-
* @param bool $withUri
44-
* @return string
45-
*/
4651
public function createEndpoint(?string $endpoint, bool $withUri = true): string
4752
{
4853
if ($withUri) {
49-
return $this->url . $this->uri . $this->start($endpoint);
54+
return $this->url.$this->uri.$this->start($endpoint);
5055
}
5156

52-
return $this->url . $this->start($endpoint);
57+
return $this->url.$this->start($endpoint);
5358
}
5459

5560
/**
56-
* @param string $customerKey
5761
* @return $this
5862
*/
5963
public function customerKey(string $customerKey): static
@@ -64,7 +68,6 @@ public function customerKey(string $customerKey): static
6468
}
6569

6670
/**
67-
* @param string $cardNumber
6871
* @return $this
6972
*/
7073
public function cardNumber(string $cardNumber): static
@@ -75,7 +78,6 @@ public function cardNumber(string $cardNumber): static
7578
}
7679

7780
/**
78-
* @param string $cardExpirationYear
7981
* @return $this
8082
*/
8183
public function cardExpirationYear(string $cardExpirationYear): static
@@ -86,7 +88,6 @@ public function cardExpirationYear(string $cardExpirationYear): static
8688
}
8789

8890
/**
89-
* @param string $cardExpirationMonth
9091
* @return $this
9192
*/
9293
public function cardExpirationMonth(string $cardExpirationMonth): static
@@ -97,7 +98,6 @@ public function cardExpirationMonth(string $cardExpirationMonth): static
9798
}
9899

99100
/**
100-
* @param string $customerIdentityNumber
101101
* @return $this
102102
*/
103103
public function customerIdentityNumber(string $customerIdentityNumber)
@@ -107,20 +107,12 @@ public function customerIdentityNumber(string $customerIdentityNumber)
107107
return $this;
108108
}
109109

110-
/**
111-
* @param string|null $cardPassword
112-
* @param string|null $customerName
113-
* @param string|null $customerEmail
114-
* @param Vbv|null $vbv
115-
* @return PromiseInterface|Response
116-
*/
117110
public function authorizationsCard(
118111
?string $cardPassword = null,
119112
?string $customerName = null,
120113
?string $customerEmail = null,
121-
?Vbv $vbv = null
122-
): PromiseInterface|Response
123-
{
114+
?Vbv $vbv = null
115+
): PromiseInterface|Response {
124116
$parameters = [];
125117
if ($cardPassword) {
126118
$parameters['cardPassword'] = $cardPassword;
@@ -135,21 +127,18 @@ public function authorizationsCard(
135127
}
136128

137129
if ($vbv) {
138-
$parameters['vbv'] = (array)$vbv;
130+
$parameters['vbv'] = (array) $vbv;
139131
}
140132

141133
return $this->client->post($this->createEndpoint('/authorizations/card'), [
142-
'customerKey' => $this->customerKey,
143-
'cardNumber' => $this->cardNumber,
144-
'cardExpirationYear' => $this->cardExpirationYear,
145-
'cardExpirationMonth' => $this->cardExpirationMonth,
146-
'customerIdentityNumber' => $this->customerIdentityNumber,
147-
] + $parameters);
134+
'customerKey' => $this->customerKey,
135+
'cardNumber' => $this->cardNumber,
136+
'cardExpirationYear' => $this->cardExpirationYear,
137+
'cardExpirationMonth' => $this->cardExpirationMonth,
138+
'customerIdentityNumber' => $this->customerIdentityNumber,
139+
] + $parameters);
148140
}
149141

150-
/**
151-
* @return PromiseInterface|Response
152-
*/
153142
public function authorizationsIssue(): PromiseInterface|Response
154143
{
155144
return $this->client->post($this->createEndpoint('/authorizations/issue'), [
@@ -159,7 +148,6 @@ public function authorizationsIssue(): PromiseInterface|Response
159148
}
160149

161150
/**
162-
* @param string $billingKey
163151
* @return $this
164152
*/
165153
public function billingKey(string $billingKey): static
@@ -190,22 +178,13 @@ public function orderName(string $orderName): static
190178
return $this;
191179
}
192180

193-
/**
194-
* @param string|null $customerEmail
195-
* @param string|null $customerName
196-
* @param string|null $customerMobilePhone
197-
* @param int|null $taxFreeAmount
198-
* @param int|null $cardInstallmentPlan
199-
* @return PromiseInterface|Response
200-
*/
201181
public function request(
202182
?string $customerEmail = null,
203183
?string $customerName = null,
204184
?string $customerMobilePhone = null,
205-
?int $taxFreeAmount = null,
206-
?int $cardInstallmentPlan = null
207-
): PromiseInterface|Response
208-
{
185+
?int $taxFreeAmount = null,
186+
?int $cardInstallmentPlan = null
187+
): PromiseInterface|Response {
209188
$parameters = [];
210189
if ($customerEmail) {
211190
$parameters['customerEmail'] = $customerEmail;
@@ -227,11 +206,11 @@ public function request(
227206
$parameters['cardInstallmentPlan'] = $cardInstallmentPlan;
228207
}
229208

230-
return $this->client->post($this->createEndpoint('/' . $this->billingKey), [
231-
'amount' => $this->amount,
232-
'customerKey' => $this->customerKey,
233-
'orderId' => $this->orderId,
234-
'orderName' => $this->orderName,
235-
] + $parameters);
209+
return $this->client->post($this->createEndpoint('/'.$this->billingKey), [
210+
'amount' => $this->amount,
211+
'customerKey' => $this->customerKey,
212+
'orderId' => $this->orderId,
213+
'orderName' => $this->orderName,
214+
] + $parameters);
236215
}
237216
}

src/Attributes/CashReceipt.php

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,16 @@ public function initializeUri(): static
4141
return $this;
4242
}
4343

44-
/**
45-
* @param string|null $endpoint
46-
* @param bool $withUri
47-
* @return string
48-
*/
4944
public function createEndpoint(?string $endpoint, bool $withUri = true): string
5045
{
5146
if ($withUri) {
52-
return $this->url . $this->uri . $this->start($endpoint);
47+
return $this->url.$this->uri.$this->start($endpoint);
5348
}
5449

55-
return $this->url . $this->start($endpoint);
50+
return $this->url.$this->start($endpoint);
5651
}
5752

5853
/**
59-
* @param string $receiptKey
6054
* @return $this
6155
*/
6256
public function receiptKey(string $receiptKey): static
@@ -67,7 +61,6 @@ public function receiptKey(string $receiptKey): static
6761
}
6862

6963
/**
70-
* @param int $amount
7164
* @return $this
7265
*/
7366
public function amount(int $amount): static
@@ -78,7 +71,6 @@ public function amount(int $amount): static
7871
}
7972

8073
/**
81-
* @param string $orderId
8274
* @return $this
8375
*/
8476
public function orderId(string $orderId): static
@@ -89,7 +81,6 @@ public function orderId(string $orderId): static
8981
}
9082

9183
/**
92-
* @param string $orderName
9384
* @return $this
9485
*/
9586
public function orderName(string $orderName): static
@@ -100,7 +91,6 @@ public function orderName(string $orderName): static
10091
}
10192

10293
/**
103-
* @param string $customerIdentityNumber
10494
* @return $this
10595
*/
10696
public function customerIdentityNumber(string $customerIdentityNumber): static
@@ -111,7 +101,6 @@ public function customerIdentityNumber(string $customerIdentityNumber): static
111101
}
112102

113103
/**
114-
* @param string $type
115104
* @return $this
116105
*/
117106
public function type(string $type): static
@@ -121,10 +110,6 @@ public function type(string $type): static
121110
return $this;
122111
}
123112

124-
/**
125-
* @param int|null $taxFreeAmount
126-
* @return PromiseInterface|Response
127-
*/
128113
public function request(?int $taxFreeAmount = null): PromiseInterface|Response
129114
{
130115
$parameters = [];
@@ -133,30 +118,25 @@ public function request(?int $taxFreeAmount = null): PromiseInterface|Response
133118
}
134119

135120
return $this->client->post($this->createEndpoint('/'), [
136-
'amount' => $this->amount,
137-
'orderId' => $this->orderId,
138-
'orderName' => $this->orderName,
139-
'customerIdentityNumber' => $this->customerIdentityNumber,
140-
'type' => $this->type,
141-
] + $parameters);
121+
'amount' => $this->amount,
122+
'orderId' => $this->orderId,
123+
'orderName' => $this->orderName,
124+
'customerIdentityNumber' => $this->customerIdentityNumber,
125+
'type' => $this->type,
126+
] + $parameters);
142127
}
143128

144-
/**
145-
* @param int|null $amount
146-
* @return PromiseInterface|Response
147-
*/
148129
public function cancel(?int $amount = null): PromiseInterface|Response
149130
{
150131
$parameters = [];
151132
if ($amount) {
152133
$parameters['amount'] = $amount;
153134
}
154135

155-
return $this->client->post($this->createEndpoint('/' . $this->receiptKey . '/cancel'), $parameters);
136+
return $this->client->post($this->createEndpoint('/'.$this->receiptKey.'/cancel'), $parameters);
156137
}
157138

158139
/**
159-
* @param string $requestDate
160140
* @return $this
161141
*/
162142
public function requestDate(string $requestDate): static
@@ -166,11 +146,6 @@ public function requestDate(string $requestDate): static
166146
return $this;
167147
}
168148

169-
/**
170-
* @param int|null $cursor
171-
* @param int|null $limit
172-
* @return PromiseInterface|Response
173-
*/
174149
public function get(?int $cursor = null, ?int $limit = null): PromiseInterface|Response
175150
{
176151
$parameters = [];
@@ -183,7 +158,7 @@ public function get(?int $cursor = null, ?int $limit = null): PromiseInterface|R
183158
}
184159

185160
return $this->client->get($this->createEndpoint('/'), [
186-
'requestDate' => $this->requestDate,
187-
] + $parameters);
161+
'requestDate' => $this->requestDate,
162+
] + $parameters);
188163
}
189164
}

0 commit comments

Comments
 (0)