Clean up debug code

This commit is contained in:
James Cole 2018-01-21 20:03:13 +01:00
parent 9350b4939c
commit cb81446ca6
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -412,12 +412,10 @@ class UpgradeDatabase extends Command
if (!(intval($transaction->transaction_currency_id) === intval($currency->id)) && null === $transaction->foreign_amount) {
Log::debug(
sprintf(
'Transaction #%d has a currency setting (#%d) (%s) that should be #%d (%s). Amount remains %s, currency is changed.',
'Transaction #%d has a currency setting #%d that should be #%d. Amount remains %s, currency is changed.',
$transaction->id,
$transaction->transaction_currency_id,
$this->var_dump_ret(intval($transaction->transaction_currency_id)),
$currency->id,
$this->var_dump_ret(intval($currency->id)),
$transaction->amount
)
);
@ -504,19 +502,4 @@ class UpgradeDatabase extends Command
return;
}
/**
* @param null $mixed
*
* @return string
*/
private function var_dump_ret($mixed = null): string
{
ob_start();
var_dump($mixed);
$content = ob_get_contents();
ob_end_clean();
return trim($content);
}
}