mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Added PHP7 return type statements.
This commit is contained in:
@@ -24,7 +24,7 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function countAccounts(array $types);
|
||||
public function countAccounts(array $types): int;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
@@ -32,7 +32,7 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function destroy(Account $account, Account $moveTo = null);
|
||||
public function destroy(Account $account, Account $moveTo = null): bool;
|
||||
|
||||
/**
|
||||
* @param int $accountId
|
||||
@@ -41,7 +41,7 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return Account
|
||||
*/
|
||||
public function find(int $accountId);
|
||||
public function find(int $accountId): Account;
|
||||
|
||||
/**
|
||||
* Gets all the accounts by ID, for a given set.
|
||||
@@ -50,14 +50,14 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function get(array $ids);
|
||||
public function get(array $ids): Collection;
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAccounts(array $types);
|
||||
public function getAccounts(array $types): Collection;
|
||||
|
||||
/**
|
||||
* This method returns the users credit cards, along with some basic information about the
|
||||
@@ -70,7 +70,7 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getCreditCards(Carbon $date);
|
||||
public function getCreditCards(Carbon $date): Collection;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
@@ -78,23 +78,23 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return Transaction
|
||||
*/
|
||||
public function getFirstTransaction(TransactionJournal $journal, Account $account);
|
||||
public function getFirstTransaction(TransactionJournal $journal, Account $account): Transaction;
|
||||
|
||||
/**
|
||||
* @param Preference $preference
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFrontpageAccounts(Preference $preference);
|
||||
public function getFrontpageAccounts(Preference $preference): Collection;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFrontpageTransactions(Account $account, Carbon $start, Carbon $end);
|
||||
public function getFrontpageTransactions(Account $account, Carbon $start, Carbon $end): Collection;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
@@ -102,48 +102,48 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return LengthAwarePaginator
|
||||
*/
|
||||
public function getJournals(Account $account, $page);
|
||||
public function getJournals(Account $account, $page): LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Get the accounts of a user that have piggy banks connected to them.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getPiggyBankAccounts();
|
||||
public function getPiggyBankAccounts(): Collection;
|
||||
|
||||
/**
|
||||
* Get savings accounts and the balance difference in the period.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getSavingsAccounts();
|
||||
public function getSavingsAccounts() : Collection;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return float
|
||||
* @return string
|
||||
*/
|
||||
public function leftOnAccount(Account $account, Carbon $date);
|
||||
public function leftOnAccount(Account $account, Carbon $date): string;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
*
|
||||
* @return TransactionJournal|null
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function openingBalanceTransaction(Account $account);
|
||||
public function openingBalanceTransaction(Account $account) : TransactionJournal;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @return Account
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data) : Account;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function sumOfEverything();
|
||||
public function sumOfEverything() : string;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
@@ -151,5 +151,5 @@ interface AccountRepositoryInterface
|
||||
*
|
||||
* @return Account
|
||||
*/
|
||||
public function update(Account $account, array $data);
|
||||
public function update(Account $account, array $data): Account;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user