Skip to content

Commit 55d197f

Browse files
author
Kevin Hellemun
committed
Ran auto formatter. (#126)
1 parent 7e5ce59 commit 55d197f

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

tests/BunqSdkTestBase.php

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ class BunqSdkTestBase extends TestCase
6767
*/
6868
const INDEX_FIRST = 0;
6969

70+
/**
71+
* Spending money constants.
72+
*/
73+
const SPENDING_MONEY_AMOUNT = '500';
74+
const SPENDING_MONEY_RECIPIENT = 'sugardaddy@bunq.com';
75+
const SPENDING_MONEY_DESCRIPTION = 'sdk php test, thanks daddy <3';
76+
7077
/**
7178
* @var MonetaryAccountBank
7279
*/
@@ -77,13 +84,6 @@ class BunqSdkTestBase extends TestCase
7784
*/
7885
protected $cashRegister;
7986

80-
/**
81-
* Spending money constants.
82-
*/
83-
const SPENDING_MONEY_AMOUNT = '500';
84-
const SPENDING_MONEY_RECIPIENT = 'sugardaddy@bunq.com';
85-
const SPENDING_MONEY_DESCRIPTION = 'sdk php test, thanks daddy <3';
86-
8787
/**
8888
*/
8989
public static function setUpBeforeClass()
@@ -112,43 +112,6 @@ protected function setUp()
112112
BunqContext::getUserContext()->refreshUserContext();
113113
}
114114

115-
/**
116-
*/
117-
private function setCashRegister()
118-
{
119-
$attachmentUuid = AttachmentPublic::create(
120-
FileUtil::getFileContents(__DIR__ . self::FILE_PATH_AVATAR),
121-
[
122-
ApiClient::HEADER_CONTENT_TYPE => $this->getAttachmentContentType(),
123-
ApiClient::HEADER_ATTACHMENT_DESCRIPTION => $this->getAttachmentDescription(),
124-
]
125-
);
126-
$avatarUuid = Avatar::create($attachmentUuid->getValue());
127-
$cashRegisterId = CashRegister::create(
128-
self::CASH_REGISTER_NAME,
129-
self::CASH_REGISTER_STATUS,
130-
$avatarUuid->getValue()
131-
);
132-
133-
$this->cashRegister = CashRegister::get($cashRegisterId->getValue());
134-
}
135-
136-
/**
137-
* @return string
138-
*/
139-
protected function getAttachmentContentType(): string
140-
{
141-
return self::ATTACHMENT_CONTENT_TYPE;
142-
}
143-
144-
/**
145-
* @return string
146-
*/
147-
protected function getAttachmentDescription(): string
148-
{
149-
return self::ATTACHMENT_DESCRIPTION;
150-
}
151-
152115
/**
153116
*/
154117
private function setSecondMonetaryAccountBank()
@@ -181,6 +144,14 @@ private function requestSpendingMoney()
181144
);
182145
}
183146

147+
/**
148+
* @return int
149+
*/
150+
protected function getSecondMonetaryAccountId(): int
151+
{
152+
return $this->secondMonetaryAccountBank->getId();
153+
}
154+
184155
/**
185156
* @return Pointer
186157
*
@@ -234,14 +205,6 @@ protected function getPointerUserBravo(): Pointer
234205
);
235206
}
236207

237-
/**
238-
* @return int
239-
*/
240-
protected function getSecondMonetaryAccountId(): int
241-
{
242-
return $this->secondMonetaryAccountBank->getId();
243-
}
244-
245208
/**
246209
* @return int
247210
*/
@@ -255,13 +218,40 @@ protected function getCashRegisterId(): int
255218
}
256219

257220
/**
258-
* @return bool
259221
*/
260-
protected function isMonetaryAccountBalanceSufficient(): bool
222+
private function setCashRegister()
261223
{
262-
$balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue());
224+
$attachmentUuid = AttachmentPublic::create(
225+
FileUtil::getFileContents(__DIR__ . self::FILE_PATH_AVATAR),
226+
[
227+
ApiClient::HEADER_CONTENT_TYPE => $this->getAttachmentContentType(),
228+
ApiClient::HEADER_ATTACHMENT_DESCRIPTION => $this->getAttachmentDescription(),
229+
]
230+
);
231+
$avatarUuid = Avatar::create($attachmentUuid->getValue());
232+
$cashRegisterId = CashRegister::create(
233+
self::CASH_REGISTER_NAME,
234+
self::CASH_REGISTER_STATUS,
235+
$avatarUuid->getValue()
236+
);
263237

264-
return $balance > self::MONETARY_ACCOUNT_BALANCE_THRESHOLD;
238+
$this->cashRegister = CashRegister::get($cashRegisterId->getValue());
239+
}
240+
241+
/**
242+
* @return string
243+
*/
244+
protected function getAttachmentContentType(): string
245+
{
246+
return self::ATTACHMENT_CONTENT_TYPE;
247+
}
248+
249+
/**
250+
* @return string
251+
*/
252+
protected function getAttachmentDescription(): string
253+
{
254+
return self::ATTACHMENT_DESCRIPTION;
265255
}
266256

267257
/**
@@ -275,4 +265,14 @@ protected function skipTestIfNeededDueToInsufficientBalance(): bool
275265

276266
return true;
277267
}
268+
269+
/**
270+
* @return bool
271+
*/
272+
protected function isMonetaryAccountBalanceSufficient(): bool
273+
{
274+
$balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue());
275+
276+
return $balance > self::MONETARY_ACCOUNT_BALANCE_THRESHOLD;
277+
}
278278
}

0 commit comments

Comments
 (0)