Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 12:24:51 +01:00
parent bdcd9825ec
commit b27fe59ab4
44 changed files with 414 additions and 332 deletions

View File

@@ -65,11 +65,11 @@ class FixUnevenAmount extends Command
->get(['transaction_journal_id', DB::raw('SUM(amount) AS the_sum')]);
/** @var stdClass $entry */
foreach ($journals as $entry) {
if (0 !== bccomp((string) $entry->the_sum, '0')) {
if (0 !== bccomp((string)$entry->the_sum, '0')) {
$message = sprintf('Sum of journal #%d is %s instead of zero.', $entry->transaction_journal_id, $entry->the_sum);
$this->warn($message);
Log::warning($message);
$this->fixJournal((int) $entry->transaction_journal_id);
$this->fixJournal((int)$entry->transaction_journal_id);
$count++;
}
}
@@ -84,7 +84,7 @@ class FixUnevenAmount extends Command
}
/**
* @param int $param
* @param int $param
*/
private function fixJournal(int $param): void
{
@@ -110,7 +110,7 @@ class FixUnevenAmount extends Command
return;
}
$amount = bcmul('-1', (string) $source->amount);
$amount = bcmul('-1', (string)$source->amount);
// fix amount of destination:
/** @var Transaction $destination */