Skip to content

Commit

Permalink
Ran auto formatter. (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Apr 6, 2018
1 parent 7e5ce59 commit 55d197f
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions tests/BunqSdkTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ class BunqSdkTestBase extends TestCase
*/
const INDEX_FIRST = 0;

/**
* Spending money constants.
*/
const SPENDING_MONEY_AMOUNT = '500';
const SPENDING_MONEY_RECIPIENT = '[email protected]';
const SPENDING_MONEY_DESCRIPTION = 'sdk php test, thanks daddy <3';

/**
* @var MonetaryAccountBank
*/
Expand All @@ -77,13 +84,6 @@ class BunqSdkTestBase extends TestCase
*/
protected $cashRegister;

/**
* Spending money constants.
*/
const SPENDING_MONEY_AMOUNT = '500';
const SPENDING_MONEY_RECIPIENT = '[email protected]';
const SPENDING_MONEY_DESCRIPTION = 'sdk php test, thanks daddy <3';

/**
*/
public static function setUpBeforeClass()
Expand Down Expand Up @@ -112,43 +112,6 @@ protected function setUp()
BunqContext::getUserContext()->refreshUserContext();
}

/**
*/
private function setCashRegister()
{
$attachmentUuid = AttachmentPublic::create(
FileUtil::getFileContents(__DIR__ . self::FILE_PATH_AVATAR),
[
ApiClient::HEADER_CONTENT_TYPE => $this->getAttachmentContentType(),
ApiClient::HEADER_ATTACHMENT_DESCRIPTION => $this->getAttachmentDescription(),
]
);
$avatarUuid = Avatar::create($attachmentUuid->getValue());
$cashRegisterId = CashRegister::create(
self::CASH_REGISTER_NAME,
self::CASH_REGISTER_STATUS,
$avatarUuid->getValue()
);

$this->cashRegister = CashRegister::get($cashRegisterId->getValue());
}

/**
* @return string
*/
protected function getAttachmentContentType(): string
{
return self::ATTACHMENT_CONTENT_TYPE;
}

/**
* @return string
*/
protected function getAttachmentDescription(): string
{
return self::ATTACHMENT_DESCRIPTION;
}

/**
*/
private function setSecondMonetaryAccountBank()
Expand Down Expand Up @@ -181,6 +144,14 @@ private function requestSpendingMoney()
);
}

/**
* @return int
*/
protected function getSecondMonetaryAccountId(): int
{
return $this->secondMonetaryAccountBank->getId();
}

/**
* @return Pointer
*
Expand Down Expand Up @@ -234,14 +205,6 @@ protected function getPointerUserBravo(): Pointer
);
}

/**
* @return int
*/
protected function getSecondMonetaryAccountId(): int
{
return $this->secondMonetaryAccountBank->getId();
}

/**
* @return int
*/
Expand All @@ -255,13 +218,40 @@ protected function getCashRegisterId(): int
}

/**
* @return bool
*/
protected function isMonetaryAccountBalanceSufficient(): bool
private function setCashRegister()
{
$balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue());
$attachmentUuid = AttachmentPublic::create(
FileUtil::getFileContents(__DIR__ . self::FILE_PATH_AVATAR),
[
ApiClient::HEADER_CONTENT_TYPE => $this->getAttachmentContentType(),
ApiClient::HEADER_ATTACHMENT_DESCRIPTION => $this->getAttachmentDescription(),
]
);
$avatarUuid = Avatar::create($attachmentUuid->getValue());
$cashRegisterId = CashRegister::create(
self::CASH_REGISTER_NAME,
self::CASH_REGISTER_STATUS,
$avatarUuid->getValue()
);

return $balance > self::MONETARY_ACCOUNT_BALANCE_THRESHOLD;
$this->cashRegister = CashRegister::get($cashRegisterId->getValue());
}

/**
* @return string
*/
protected function getAttachmentContentType(): string
{
return self::ATTACHMENT_CONTENT_TYPE;
}

/**
* @return string
*/
protected function getAttachmentDescription(): string
{
return self::ATTACHMENT_DESCRIPTION;
}

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

return true;
}

/**
* @return bool
*/
protected function isMonetaryAccountBalanceSufficient(): bool
{
$balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue());

return $balance > self::MONETARY_ACCOUNT_BALANCE_THRESHOLD;
}
}

0 comments on commit 55d197f

Please sign in to comment.