mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Various bugfixes and code clean up.
This commit is contained in:
@@ -161,7 +161,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
$set = $set->sortBy(
|
||||
function (Bill $bill) {
|
||||
$int = 1 === $bill->active ? 0 : 1;
|
||||
$int = $bill->active ? 0 : 1;
|
||||
|
||||
return $int . strtolower($bill->name);
|
||||
}
|
||||
|
||||
@@ -144,11 +144,12 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
||||
{
|
||||
$disk = Storage::disk('export');
|
||||
$file = $job->key . '.zip';
|
||||
$content = '';
|
||||
|
||||
try {
|
||||
$content = $disk->get($file);
|
||||
} catch (FileNotFoundException $e) {
|
||||
Log::warning(sprintf('File not found: %s', $e->getMessage()));
|
||||
$content = '';
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
||||
@@ -150,12 +150,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
*/
|
||||
public function getConfiguration(ImportJob $job): array
|
||||
{
|
||||
$config = $job->configuration;
|
||||
if (\is_array($config)) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
return [];
|
||||
return $job->configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -477,7 +477,6 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
|
||||
$value = $entry->data;
|
||||
|
||||
// return when array:
|
||||
if (\is_array($value)) {
|
||||
$return = implode(',', $value);
|
||||
$cache->store($return);
|
||||
|
||||
@@ -379,7 +379,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
||||
$repDate = Carbon::createFromFormat('Y-m-d', $repetition->repetition_moment);
|
||||
$diffInYears = $today->diffInYears($repDate);
|
||||
$repDate->addYears($diffInYears); // technically not necessary.
|
||||
$string = $repDate->formatLocalized(trans('config.month_and_day_no_year'));
|
||||
$string = $repDate->formatLocalized((string)trans('config.month_and_day_no_year'));
|
||||
|
||||
return (string)trans('firefly.recurring_yearly', ['date' => $string], $language);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user