Reformat various code.

This commit is contained in:
James Cole
2022-03-29 14:59:58 +02:00
parent 29bed2547c
commit d1a09ff33b
115 changed files with 2700 additions and 2699 deletions

View File

@@ -69,9 +69,9 @@ class JournalAPIRepository implements JournalAPIRepositoryInterface
return $set->each(
static function (Attachment $attachment) use ($disk) {
$notes = $attachment->notes()->first();
$notes = $attachment->notes()->first();
$attachment->file_exists = $disk->exists($attachment->fileName());
$attachment->notes = $notes ? $notes->text : '';
$attachment->notes = $notes ? $notes->text : '';
return $attachment;
}

View File

@@ -190,7 +190,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
}
// return when something else:
$return = (string)$value;
$return = (string) $value;
try {
$cache->store($return);
} catch (Exception $e) { // @phpstan-ignore-line
@@ -232,8 +232,8 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
$journalIds = [];
/** @var stdClass $row */
foreach ($result as $row) {
if ((int)$row->transaction_count > 2) {
$journalIds[] = (int)$row->id;
if ((int) $row->transaction_count > 2) {
$journalIds[] = (int) $row->id;
}
}
$journalIds = array_unique($journalIds);

View File

@@ -143,7 +143,7 @@ class JournalRepository implements JournalRepositoryInterface
// saves on queries:
$amount = $journal->transactions()->where('amount', '>', 0)->get()->sum('amount');
$amount = (string)$amount;
$amount = (string) $amount;
$cache->store($amount);
return $amount;