mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Reformat various code.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user