mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Implement all setUser methods.
This commit is contained in:
@@ -323,6 +323,14 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
return $journal->date;
|
return $journal->date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
|
@@ -27,11 +27,6 @@ use Illuminate\Support\Collection;
|
|||||||
interface AccountRepositoryInterface
|
interface AccountRepositoryInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* @param User $user
|
|
||||||
*/
|
|
||||||
public function setUser(User $user);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moved here from account CRUD.
|
* Moved here from account CRUD.
|
||||||
*
|
*
|
||||||
@@ -130,6 +125,11 @@ interface AccountRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function oldestJournalDate(Account $account): Carbon;
|
public function oldestJournalDate(Account $account): Carbon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
|
@@ -108,8 +108,8 @@ class AccountTasker implements AccountTaskerInterface
|
|||||||
*/
|
*/
|
||||||
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array
|
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
$ids = $accounts->pluck('id')->toArray();
|
$ids = $accounts->pluck('id')->toArray();
|
||||||
$yesterday = clone $start;
|
$yesterday = clone $start;
|
||||||
$yesterday->subDay();
|
$yesterday->subDay();
|
||||||
$startSet = Steam::balancesById($ids, $yesterday);
|
$startSet = Steam::balancesById($ids, $yesterday);
|
||||||
$endSet = Steam::balancesById($ids, $end);
|
$endSet = Steam::balancesById($ids, $end);
|
||||||
@@ -155,6 +155,14 @@ class AccountTasker implements AccountTaskerInterface
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will return how much money has been going out (ie. spent) by the given account(s).
|
* Will return how much money has been going out (ie. spent) by the given account(s).
|
||||||
* Alternatively, will return how much money has been coming in (ie. earned) by the given accounts.
|
* Alternatively, will return how much money has been coming in (ie. earned) by the given accounts.
|
||||||
|
@@ -24,11 +24,6 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
interface AccountTaskerInterface
|
interface AccountTaskerInterface
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @param User $user
|
|
||||||
*/
|
|
||||||
public function setUser(User $user);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
* @param Collection $excluded
|
* @param Collection $excluded
|
||||||
@@ -62,4 +57,9 @@ interface AccountTaskerInterface
|
|||||||
*/
|
*/
|
||||||
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array;
|
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,13 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
|||||||
{
|
{
|
||||||
/** @var User */
|
/** @var User */
|
||||||
private $user;
|
private $user;
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* AttachmentRepository constructor.
|
* AttachmentRepository constructor.
|
||||||
*
|
*
|
||||||
|
@@ -36,7 +36,13 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
|
|
||||||
/** @var User */
|
/** @var User */
|
||||||
private $user;
|
private $user;
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* BillRepository constructor.
|
* BillRepository constructor.
|
||||||
*
|
*
|
||||||
|
@@ -47,7 +47,13 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@@ -43,7 +43,13 @@ class CategoryRepository implements CategoryRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param Category $category
|
* @param Category $category
|
||||||
*
|
*
|
||||||
|
@@ -39,7 +39,13 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
*
|
*
|
||||||
|
@@ -38,7 +38,13 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param ExportJob $job
|
* @param ExportJob $job
|
||||||
* @param string $status
|
* @param string $status
|
||||||
|
@@ -37,7 +37,13 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param string $fileType
|
* @param string $fileType
|
||||||
*
|
*
|
||||||
|
@@ -52,7 +52,13 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
* @param TransactionType $type
|
* @param TransactionType $type
|
||||||
|
@@ -152,6 +152,14 @@ class JournalTasker implements JournalTaskerInterface
|
|||||||
return $transactions;
|
return $transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect the balance of an account before the given transaction has hit. This is tricky, because
|
* Collect the balance of an account before the given transaction has hit. This is tricky, because
|
||||||
* the balance does not depend on the transaction itself but the journal it's part of. And of course
|
* the balance does not depend on the transaction itself but the journal it's part of. And of course
|
||||||
|
@@ -41,7 +41,13 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
|
@@ -39,7 +39,13 @@ class RuleRepository implements RuleRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
@@ -39,7 +39,13 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
@@ -43,7 +43,13 @@ class TagRepository implements TagRepositoryInterface
|
|||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
|
Reference in New Issue
Block a user