mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Various code fixes.
This commit is contained in:
@@ -121,7 +121,7 @@ class ExportData extends Command
|
||||
$exporter->setExportBills($options['export']['bills']);
|
||||
$exporter->setExportPiggies($options['export']['piggies']);
|
||||
$data = $exporter->export();
|
||||
if (0 === count ($data)) {
|
||||
if (0 === count($data)) {
|
||||
$this->error('You must export *something*. Use --export-transactions or another option. See docs.firefly-iii.org');
|
||||
}
|
||||
$returnCode = 0;
|
||||
|
@@ -148,10 +148,10 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
$user = auth()->user();
|
||||
$route = $request->route();
|
||||
$param = $route->parameter('account');
|
||||
if($param instanceof Account) {
|
||||
if ($param instanceof Account) {
|
||||
$accountId = (int) $param->id;
|
||||
}
|
||||
if(!($param instanceof Account)) {
|
||||
if (!($param instanceof Account)) {
|
||||
$accountId = (int) $param;
|
||||
}
|
||||
/** @var Account $account */
|
||||
|
@@ -197,11 +197,11 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
$return = [];
|
||||
$journals = $group->transactionJournals->pluck('id')->toArray();
|
||||
$set = TransactionJournalLink::where(
|
||||
static function (Builder $q) use ($journals) {
|
||||
$q->whereIn('source_id', $journals);
|
||||
$q->orWhereIn('destination_id', $journals);
|
||||
}
|
||||
)
|
||||
static function (Builder $q) use ($journals) {
|
||||
$q->whereIn('source_id', $journals);
|
||||
$q->orWhereIn('destination_id', $journals);
|
||||
}
|
||||
)
|
||||
->with(['source', 'destination', 'source.transactions'])
|
||||
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
||||
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable']);
|
||||
|
Reference in New Issue
Block a user