@@ -47,7 +47,7 @@ |
||
47 | 47 | { |
48 | 48 | $this->app->bind( |
49 | 49 | PiggyBankRepositoryInterface::class, |
50 | - function (Application $app) { |
|
50 | + function(Application $app) { |
|
51 | 51 | /** @var PiggyBankRepository $repository */ |
52 | 52 | $repository = app(PiggyBankRepository::class); |
53 | 53 | if ($app->auth->check()) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $this->app->bind( |
47 | 47 | TagRepositoryInterface::class, |
48 | - function (Application $app) { |
|
48 | + function(Application $app) { |
|
49 | 49 | /** @var TagRepository $repository */ |
50 | 50 | $repository = app(TagRepository::class); |
51 | 51 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $this->app->bind( |
47 | 47 | AttachmentRepositoryInterface::class, |
48 | - function (Application $app) { |
|
48 | + function(Application $app) { |
|
49 | 49 | /** @var AttachmentRepositoryInterface $repository */ |
50 | 50 | $repository = app(AttachmentRepository::class); |
51 | 51 | if ($app->auth->check()) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $this->app->bind( |
47 | 47 | RuleRepositoryInterface::class, |
48 | - function (Application $app) { |
|
48 | + function(Application $app) { |
|
49 | 49 | /** @var RuleRepository $repository */ |
50 | 50 | $repository = app(RuleRepository::class); |
51 | 51 | if ($app->auth->check()) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $this->app->bind( |
60 | 60 | ExportJobRepositoryInterface::class, |
61 | - function (Application $app) { |
|
61 | + function(Application $app) { |
|
62 | 62 | /** @var ExportJobRepository $repository */ |
63 | 63 | $repository = app(ExportJobRepository::class); |
64 | 64 | if ($app->auth->check()) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | $this->app->bind( |
76 | 76 | ImportJobRepositoryInterface::class, |
77 | - function (Application $app) { |
|
77 | + function(Application $app) { |
|
78 | 78 | /** @var ImportJobRepository $repository */ |
79 | 79 | $repository = app(ImportJobRepository::class); |
80 | 80 | if ($app->auth->check()) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $this->app->bind( |
47 | 47 | BillRepositoryInterface::class, |
48 | - function (Application $app) { |
|
48 | + function(Application $app) { |
|
49 | 49 | /** @var BillRepositoryInterface $repository */ |
50 | 50 | $repository = app(BillRepository::class); |
51 | 51 |
@@ -83,12 +83,12 @@ |
||
83 | 83 | $q->orWhereNull('startdate'); |
84 | 84 | } |
85 | 85 | ) |
86 | - ->where( |
|
87 | - function (EloquentBuilder $q) use ($date) { |
|
88 | - $q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00')); |
|
89 | - $q->orWhereNull('targetdate'); |
|
90 | - } |
|
91 | - ); |
|
86 | + ->where( |
|
87 | + function (EloquentBuilder $q) use ($date) { |
|
88 | + $q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00')); |
|
89 | + $q->orWhereNull('targetdate'); |
|
90 | + } |
|
91 | + ); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -83,13 +83,13 @@ |
||
83 | 83 | public function scopeRelevantOnDate(EloquentBuilder $query, Carbon $date) |
84 | 84 | { |
85 | 85 | return $query->where( |
86 | - function (EloquentBuilder $q) use ($date) { |
|
86 | + function(EloquentBuilder $q) use ($date) { |
|
87 | 87 | $q->where('startdate', '<=', $date->format('Y-m-d 00:00:00')); |
88 | 88 | $q->orWhereNull('startdate'); |
89 | 89 | } |
90 | 90 | ) |
91 | 91 | ->where( |
92 | - function (EloquentBuilder $q) use ($date) { |
|
92 | + function(EloquentBuilder $q) use ($date) { |
|
93 | 93 | $q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00')); |
94 | 94 | $q->orWhereNull('targetdate'); |
95 | 95 | } |
@@ -108,9 +108,9 @@ |
||
108 | 108 | public function getIBJournal(Account $account): ?TransactionJournal |
109 | 109 | { |
110 | 110 | $journal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
111 | - ->where('transactions.account_id', $account->id) |
|
112 | - ->transactionTypes([TransactionType::OPENING_BALANCE]) |
|
113 | - ->first(['transaction_journals.*']); |
|
111 | + ->where('transactions.account_id', $account->id) |
|
112 | + ->transactionTypes([TransactionType::OPENING_BALANCE]) |
|
113 | + ->first(['transaction_journals.*']); |
|
114 | 114 | if (null === $journal) { |
115 | 115 | Log::debug('Could not find a opening balance journal, return NULL.'); |
116 | 116 |
@@ -228,9 +228,9 @@ |
||
228 | 228 | public function getOpeningBalance(): TransactionJournal |
229 | 229 | { |
230 | 230 | $journal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') |
231 | - ->where('transactions.account_id', $this->id) |
|
232 | - ->transactionTypes([TransactionType::OPENING_BALANCE]) |
|
233 | - ->first(['transaction_journals.*']); |
|
231 | + ->where('transactions.account_id', $this->id) |
|
232 | + ->transactionTypes([TransactionType::OPENING_BALANCE]) |
|
233 | + ->first(['transaction_journals.*']); |
|
234 | 234 | if (null === $journal) { |
235 | 235 | return new TransactionJournal; |
236 | 236 | } |