mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
PHP7 compatible function definitions.
This commit is contained in:
@@ -62,7 +62,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
* @param Account $account
|
||||
* @param Account $moveTo
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Account $account, Account $moveTo = null): bool
|
||||
{
|
||||
@@ -542,9 +542,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
if (!$existingAccount) {
|
||||
Log::error('Account create error: ' . $newAccount->getErrors()->toJson());
|
||||
abort(500);
|
||||
// @codeCoverageIgnoreStart
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
$newAccount = $existingAccount;
|
||||
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ interface AccountRepositoryInterface
|
||||
* @param Account $account
|
||||
* @param Account $moveTo
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Account $account, Account $moveTo): bool;
|
||||
|
||||
|
@@ -40,7 +40,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
/**
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Bill $bill): bool
|
||||
{
|
||||
|
@@ -44,7 +44,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(TransactionJournal $journal)
|
||||
public function delete(TransactionJournal $journal): bool
|
||||
{
|
||||
$journal->delete();
|
||||
|
||||
@@ -56,7 +56,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function first()
|
||||
public function first(): TransactionJournal
|
||||
{
|
||||
$entry = $this->user->transactionjournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
|
||||
|
||||
@@ -67,9 +67,9 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
* @param Transaction $transaction
|
||||
*
|
||||
* @return integer
|
||||
* @return string
|
||||
*/
|
||||
public function getAmountBefore(TransactionJournal $journal, Transaction $transaction)
|
||||
public function getAmountBefore(TransactionJournal $journal, Transaction $transaction): string
|
||||
{
|
||||
$set = $transaction->account->transactions()->leftJoin(
|
||||
'transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id'
|
||||
@@ -94,7 +94,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getCollectionOfTypes(array $types, int $offset, int $count)
|
||||
public function getCollectionOfTypes(array $types, int $offset, int $count): Collection
|
||||
{
|
||||
$set = $this->user->transactionJournals()
|
||||
->expanded()
|
||||
@@ -113,7 +113,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getJournalsOfType(TransactionType $dbType)
|
||||
public function getJournalsOfType(TransactionType $dbType): Collection
|
||||
{
|
||||
return $this->user->transactionjournals()->where('transaction_type_id', $dbType->id)->orderBy('id', 'DESC')->take(50)->get();
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return LengthAwarePaginator
|
||||
*/
|
||||
public function getJournalsOfTypes(array $types, int $offset, int $page, int $pagesize = 50)
|
||||
public function getJournalsOfTypes(array $types, int $offset, int $page, int $pagesize = 50): LengthAwarePaginator
|
||||
{
|
||||
$set = $this->user
|
||||
->transactionJournals()
|
||||
@@ -151,7 +151,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionType
|
||||
*/
|
||||
public function getTransactionType(string $type)
|
||||
public function getTransactionType(string $type): TransactionType
|
||||
{
|
||||
return TransactionType::whereType($type)->first();
|
||||
}
|
||||
@@ -162,7 +162,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function getWithDate(int $journalId, Carbon $date)
|
||||
public function getWithDate(int $journalId, Carbon $date): TransactionJournal
|
||||
{
|
||||
return $this->user->transactionjournals()->where('id', $journalId)->where('date', $date->format('Y-m-d 00:00:00'))->first();
|
||||
}
|
||||
@@ -175,9 +175,9 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
* @param array $array
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function saveTags(TransactionJournal $journal, array $array)
|
||||
public function saveTags(TransactionJournal $journal, array $array): bool
|
||||
{
|
||||
/** @var \FireflyIII\Repositories\Tag\TagRepositoryInterface $tagRepository */
|
||||
$tagRepository = app('FireflyIII\Repositories\Tag\TagRepositoryInterface');
|
||||
@@ -190,6 +190,8 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,7 +199,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function store(array $data)
|
||||
public function store(array $data): TransactionJournal
|
||||
{
|
||||
// find transaction type.
|
||||
$transactionType = TransactionType::where('type', ucfirst($data['what']))->first();
|
||||
@@ -269,7 +271,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function update(TransactionJournal $journal, array $data)
|
||||
public function update(TransactionJournal $journal, array $data): TransactionJournal
|
||||
{
|
||||
// update actual journal.
|
||||
$journal->transaction_currency_id = $data['amount_currency_id_amount'];
|
||||
@@ -329,9 +331,9 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
* @param array $array
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function updateTags(TransactionJournal $journal, array $array)
|
||||
public function updateTags(TransactionJournal $journal, array $array): bool
|
||||
{
|
||||
// create tag repository
|
||||
/** @var \FireflyIII\Repositories\Tag\TagRepositoryInterface $tagRepository */
|
||||
@@ -363,6 +365,8 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
foreach ($tags as $tag) {
|
||||
$tagRepository->connect($journal, $tag);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,7 +377,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @throws FireflyException
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
protected function storeAccounts(TransactionType $type, array $data)
|
||||
protected function storeAccounts(TransactionType $type, array $data): array
|
||||
{
|
||||
$fromAccount = null;
|
||||
$toAccount = null;
|
||||
@@ -395,18 +399,14 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
if (is_null($toAccount)) {
|
||||
Log::error('"to"-account is null, so we cannot continue!');
|
||||
throw new FireflyException('"to"-account is null, so we cannot continue!');
|
||||
// @codeCoverageIgnoreStart
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
if (is_null($fromAccount)) {
|
||||
Log::error('"from"-account is null, so we cannot continue!');
|
||||
throw new FireflyException('"from"-account is null, so we cannot continue!');
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return [$fromAccount, $toAccount];
|
||||
}
|
||||
@@ -416,7 +416,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function storeDepositAccounts(array $data)
|
||||
protected function storeDepositAccounts(array $data): array
|
||||
{
|
||||
$toAccount = Account::find($data['account_id']);
|
||||
|
||||
@@ -440,7 +440,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function storeWithdrawalAccounts(array $data)
|
||||
protected function storeWithdrawalAccounts(array $data): array
|
||||
{
|
||||
$fromAccount = Account::find($data['account_id']);
|
||||
|
||||
|
@@ -22,38 +22,22 @@ interface JournalRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(TransactionJournal $journal);
|
||||
public function delete(TransactionJournal $journal): bool;
|
||||
|
||||
/**
|
||||
* Get users first transaction journal
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function first();
|
||||
public function first(): TransactionJournal;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
* @param Transaction $transaction
|
||||
*
|
||||
* @return float
|
||||
* @return string
|
||||
*/
|
||||
public function getAmountBefore(TransactionJournal $journal, Transaction $transaction);
|
||||
|
||||
/**
|
||||
* @param TransactionType $dbType
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getJournalsOfType(TransactionType $dbType);
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
* @param int $offset
|
||||
* @param int $page
|
||||
*
|
||||
* @return LengthAwarePaginator
|
||||
*/
|
||||
public function getJournalsOfTypes(array $types, int $offset, int $page);
|
||||
public function getAmountBefore(TransactionJournal $journal, Transaction $transaction): string;
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
@@ -62,14 +46,30 @@ interface JournalRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getCollectionOfTypes(array $types, int $offset, int $count);
|
||||
public function getCollectionOfTypes(array $types, int $offset, int $count):Collection;
|
||||
|
||||
/**
|
||||
* @param TransactionType $dbType
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getJournalsOfType(TransactionType $dbType): Collection;
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
* @param int $offset
|
||||
* @param int $page
|
||||
*
|
||||
* @return LengthAwarePaginator
|
||||
*/
|
||||
public function getJournalsOfTypes(array $types, int $offset, int $page): LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
*
|
||||
* @return TransactionType
|
||||
*/
|
||||
public function getTransactionType(string $type);
|
||||
public function getTransactionType(string $type): TransactionType;
|
||||
|
||||
/**
|
||||
* @param int $journalId
|
||||
@@ -77,7 +77,7 @@ interface JournalRepositoryInterface
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function getWithDate(int $journalId, Carbon $date);
|
||||
public function getWithDate(int $journalId, Carbon $date): TransactionJournal;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
@@ -90,30 +90,30 @@ interface JournalRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
* @param array $array
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function saveTags(TransactionJournal $journal, array $array);
|
||||
public function saveTags(TransactionJournal $journal, array $array): bool;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data): TransactionJournal;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
* @param array $data
|
||||
*
|
||||
* @return mixed
|
||||
* @return TransactionJournal
|
||||
*/
|
||||
public function update(TransactionJournal $journal, array $data);
|
||||
public function update(TransactionJournal $journal, array $data): TransactionJournal;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
* @param array $array
|
||||
*
|
||||
* @return mixed
|
||||
* @return bool
|
||||
*/
|
||||
public function updateTags(TransactionJournal $journal, array $array);
|
||||
public function updateTags(TransactionJournal $journal, array $array): bool;
|
||||
}
|
||||
|
@@ -35,23 +35,24 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param string $amount
|
||||
*
|
||||
* @return bool
|
||||
* @return PiggyBankEvent
|
||||
*/
|
||||
public function createEvent(PiggyBank $piggyBank, string $amount)
|
||||
public function createEvent(PiggyBank $piggyBank, string $amount): PiggyBankEvent
|
||||
{
|
||||
PiggyBankEvent::create(['date' => Carbon::now(), 'amount' => $amount, 'piggy_bank_id' => $piggyBank->id]);
|
||||
$event = PiggyBankEvent::create(['date' => Carbon::now(), 'amount' => $amount, 'piggy_bank_id' => $piggyBank->id]);
|
||||
|
||||
return true;
|
||||
return $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return boolean|null
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(PiggyBank $piggyBank)
|
||||
public function destroy(PiggyBank $piggyBank): bool
|
||||
{
|
||||
return $piggyBank->delete();
|
||||
$piggyBank->delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +60,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getEventSummarySet(PiggyBank $piggyBank)
|
||||
public function getEventSummarySet(PiggyBank $piggyBank): Collection
|
||||
{
|
||||
return DB::table('piggy_bank_events')->where('piggy_bank_id', $piggyBank->id)->groupBy('date')->get(['date', DB::raw('SUM(`amount`) AS `sum`')]);
|
||||
}
|
||||
@@ -69,7 +70,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getEvents(PiggyBank $piggyBank)
|
||||
public function getEvents(PiggyBank $piggyBank): Collection
|
||||
{
|
||||
return $piggyBank->piggyBankEvents()->orderBy('date', 'DESC')->orderBy('id', 'DESC')->get();
|
||||
}
|
||||
@@ -77,7 +78,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxOrder()
|
||||
public function getMaxOrder(): int
|
||||
{
|
||||
return intval($this->user->piggyBanks()->max('order'));
|
||||
}
|
||||
@@ -85,7 +86,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getPiggyBanks()
|
||||
public function getPiggyBanks(): Collection
|
||||
{
|
||||
/** @var Collection $set */
|
||||
$set = $this->user->piggyBanks()->orderBy('order', 'ASC')->get();
|
||||
@@ -96,9 +97,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
/**
|
||||
* Set all piggy banks to order 0.
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function reset()
|
||||
public function reset(): bool
|
||||
{
|
||||
// split query to make it work in sqlite:
|
||||
$set = PiggyBank::
|
||||
@@ -119,9 +120,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
* @param int $piggyBankId
|
||||
* @param int $order
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function setOrder(int $piggyBankId, int $order)
|
||||
public function setOrder(int $piggyBankId, int $order): bool
|
||||
{
|
||||
$piggyBank = PiggyBank::leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')->where('accounts.user_id', $this->user->id)
|
||||
->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
|
||||
@@ -129,6 +130,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
$piggyBank->order = $order;
|
||||
$piggyBank->save();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,7 +138,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return PiggyBank
|
||||
*/
|
||||
public function store(array $data)
|
||||
public function store(array $data): PiggyBank
|
||||
{
|
||||
$data['remind_me'] = false;
|
||||
$data['reminder_skip'] = 0;
|
||||
@@ -152,7 +154,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return PiggyBank
|
||||
*/
|
||||
public function update(PiggyBank $piggyBank, array $data)
|
||||
public function update(PiggyBank $piggyBank, array $data): PiggyBank
|
||||
{
|
||||
|
||||
$piggyBank->name = $data['name'];
|
||||
|
@@ -4,6 +4,7 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Repositories\PiggyBank;
|
||||
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Models\PiggyBankEvent;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -18,47 +19,47 @@ interface PiggyBankRepositoryInterface
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param string $amount
|
||||
*
|
||||
* @return bool
|
||||
* @return PiggyBankEvent
|
||||
*/
|
||||
public function createEvent(PiggyBank $piggyBank, string $amount);
|
||||
public function createEvent(PiggyBank $piggyBank, string $amount): PiggyBankEvent;
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(PiggyBank $piggyBank);
|
||||
public function destroy(PiggyBank $piggyBank): bool;
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getEventSummarySet(PiggyBank $piggyBank);
|
||||
public function getEventSummarySet(PiggyBank $piggyBank) : Collection;
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getEvents(PiggyBank $piggyBank);
|
||||
public function getEvents(PiggyBank $piggyBank) : Collection;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxOrder();
|
||||
public function getMaxOrder(): int;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getPiggyBanks();
|
||||
public function getPiggyBanks() : Collection;
|
||||
|
||||
/**
|
||||
* Set all piggy banks to order 0.
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function reset();
|
||||
public function reset(): bool;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -67,9 +68,9 @@ interface PiggyBankRepositoryInterface
|
||||
* @param int $piggyBankId
|
||||
* @param int $order
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function setOrder(int $piggyBankId, int $order);
|
||||
public function setOrder(int $piggyBankId, int $order): bool;
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,7 +78,7 @@ interface PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return PiggyBank
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data): PiggyBank;
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
@@ -85,5 +86,5 @@ interface PiggyBankRepositoryInterface
|
||||
*
|
||||
* @return PiggyBank
|
||||
*/
|
||||
public function update(PiggyBank $piggyBank, array $data);
|
||||
public function update(PiggyBank $piggyBank, array $data): PiggyBank;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return $this->user->rules()->count();
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Rule $rule)
|
||||
public function destroy(Rule $rule): bool
|
||||
{
|
||||
foreach ($rule->ruleTriggers as $trigger) {
|
||||
$trigger->delete();
|
||||
@@ -64,9 +64,11 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* FIXME can return null
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function getFirstRuleGroup()
|
||||
public function getFirstRuleGroup(): RuleGroup
|
||||
{
|
||||
return $this->user->ruleGroups()->first();
|
||||
}
|
||||
@@ -76,7 +78,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderInRuleGroup(RuleGroup $ruleGroup)
|
||||
public function getHighestOrderInRuleGroup(RuleGroup $ruleGroup): int
|
||||
{
|
||||
return intval($ruleGroup->rules()->max('order'));
|
||||
}
|
||||
@@ -102,7 +104,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveDown(Rule $rule)
|
||||
public function moveDown(Rule $rule): bool
|
||||
{
|
||||
$order = $rule->order;
|
||||
|
||||
@@ -117,6 +119,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
$rule->order = ($rule->order + 1);
|
||||
$rule->save();
|
||||
$this->resetRulesInGroupOrder($rule->ruleGroup);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +127,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveUp(Rule $rule)
|
||||
public function moveUp(Rule $rule): bool
|
||||
{
|
||||
$order = $rule->order;
|
||||
|
||||
@@ -138,6 +141,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
$rule->order = ($rule->order - 1);
|
||||
$rule->save();
|
||||
$this->resetRulesInGroupOrder($rule->ruleGroup);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,7 +150,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reorderRuleActions(Rule $rule, array $ids)
|
||||
public function reorderRuleActions(Rule $rule, array $ids): bool
|
||||
{
|
||||
$order = 1;
|
||||
foreach ($ids as $actionId) {
|
||||
@@ -168,7 +172,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reorderRuleTriggers(Rule $rule, array $ids)
|
||||
public function reorderRuleTriggers(Rule $rule, array $ids): bool
|
||||
{
|
||||
$order = 1;
|
||||
foreach ($ids as $triggerId) {
|
||||
@@ -189,7 +193,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup)
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup): bool
|
||||
{
|
||||
$ruleGroup->rules()->whereNotNull('deleted_at')->update(['order' => 0]);
|
||||
|
||||
@@ -214,7 +218,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return Rule
|
||||
*/
|
||||
public function store(array $data)
|
||||
public function store(array $data): Rule
|
||||
{
|
||||
/** @var RuleGroup $ruleGroup */
|
||||
$ruleGroup = $this->user->ruleGroups()->find($data['rule_group_id']);
|
||||
@@ -250,7 +254,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return RuleAction
|
||||
*/
|
||||
public function storeAction(Rule $rule, array $values)
|
||||
public function storeAction(Rule $rule, array $values): RuleAction
|
||||
{
|
||||
$ruleAction = new RuleAction;
|
||||
$ruleAction->rule()->associate($rule);
|
||||
@@ -271,7 +275,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return RuleTrigger
|
||||
*/
|
||||
public function storeTrigger(Rule $rule, array $values)
|
||||
public function storeTrigger(Rule $rule, array $values): RuleTrigger
|
||||
{
|
||||
$ruleTrigger = new RuleTrigger;
|
||||
$ruleTrigger->rule()->associate($rule);
|
||||
@@ -291,7 +295,7 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
*
|
||||
* @return Rule
|
||||
*/
|
||||
public function update(Rule $rule, array $data)
|
||||
public function update(Rule $rule, array $data): Rule
|
||||
{
|
||||
// update rule:
|
||||
$rule->active = $data['active'];
|
||||
@@ -319,8 +323,10 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
/**
|
||||
* @param Rule $rule
|
||||
* @param array $data
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function storeActions(Rule $rule, array $data)
|
||||
private function storeActions(Rule $rule, array $data): bool
|
||||
{
|
||||
$order = 1;
|
||||
foreach ($data['rule-actions'] as $index => $action) {
|
||||
@@ -336,14 +342,16 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
|
||||
$this->storeAction($rule, $actionValues);
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
* @param array $data
|
||||
* @return bool
|
||||
*/
|
||||
private function storeTriggers(Rule $rule, array $data)
|
||||
private function storeTriggers(Rule $rule, array $data): bool
|
||||
{
|
||||
$order = 1;
|
||||
$stopProcessing = false;
|
||||
@@ -370,5 +378,6 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
$this->storeTrigger($rule, $triggerValues);
|
||||
$order++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -26,26 +26,26 @@ interface RuleRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function count();
|
||||
public function count(): int;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Rule $rule);
|
||||
public function destroy(Rule $rule): bool;
|
||||
|
||||
/**
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function getFirstRuleGroup();
|
||||
public function getFirstRuleGroup(): RuleGroup;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderInRuleGroup(RuleGroup $ruleGroup);
|
||||
public function getHighestOrderInRuleGroup(RuleGroup $ruleGroup): int;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -59,14 +59,14 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveDown(Rule $rule);
|
||||
public function moveDown(Rule $rule): bool;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveUp(Rule $rule);
|
||||
public function moveUp(Rule $rule): bool;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -74,7 +74,7 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reorderRuleActions(Rule $rule, array $ids);
|
||||
public function reorderRuleActions(Rule $rule, array $ids): bool;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -82,21 +82,21 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reorderRuleTriggers(Rule $rule, array $ids);
|
||||
public function reorderRuleTriggers(Rule $rule, array $ids): bool;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup);
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup): bool;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @return Rule
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data): Rule;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -104,7 +104,7 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return RuleAction
|
||||
*/
|
||||
public function storeAction(Rule $rule, array $values);
|
||||
public function storeAction(Rule $rule, array $values): RuleAction;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -112,7 +112,7 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return RuleTrigger
|
||||
*/
|
||||
public function storeTrigger(Rule $rule, array $values);
|
||||
public function storeTrigger(Rule $rule, array $values): RuleTrigger;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
@@ -120,6 +120,6 @@ interface RuleRepositoryInterface
|
||||
*
|
||||
* @return Rule
|
||||
*/
|
||||
public function update(Rule $rule, array $data);
|
||||
public function update(Rule $rule, array $data): Rule;
|
||||
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return $this->user->ruleGroups()->count();
|
||||
}
|
||||
@@ -42,9 +42,9 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
* @param RuleGroup $ruleGroup
|
||||
* @param RuleGroup $moveTo
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null)
|
||||
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool
|
||||
{
|
||||
/** @var Rule $rule */
|
||||
foreach ($ruleGroup->rules as $rule) {
|
||||
@@ -72,7 +72,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function get()
|
||||
public function get(): Collection
|
||||
{
|
||||
return $this->user->ruleGroups()->orderBy('order', 'ASC')->get();
|
||||
}
|
||||
@@ -80,7 +80,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderRuleGroup()
|
||||
public function getHighestOrderRuleGroup(): int
|
||||
{
|
||||
$entry = $this->user->ruleGroups()->max('order');
|
||||
|
||||
@@ -119,7 +119,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveDown(RuleGroup $ruleGroup)
|
||||
public function moveDown(RuleGroup $ruleGroup): bool
|
||||
{
|
||||
$order = $ruleGroup->order;
|
||||
|
||||
@@ -133,6 +133,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
$ruleGroup->order = ($ruleGroup->order + 1);
|
||||
$ruleGroup->save();
|
||||
$this->resetRuleGroupOrder();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,7 +141,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveUp(RuleGroup $ruleGroup)
|
||||
public function moveUp(RuleGroup $ruleGroup): bool
|
||||
{
|
||||
$order = $ruleGroup->order;
|
||||
|
||||
@@ -159,7 +160,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRuleGroupOrder()
|
||||
public function resetRuleGroupOrder(): bool
|
||||
{
|
||||
$this->user->ruleGroups()->whereNotNull('deleted_at')->update(['order' => 0]);
|
||||
|
||||
@@ -181,7 +182,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup)
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup): bool
|
||||
{
|
||||
$ruleGroup->rules()->whereNotNull('deleted_at')->update(['order' => 0]);
|
||||
|
||||
@@ -206,7 +207,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function store(array $data)
|
||||
public function store(array $data): RuleGroup
|
||||
{
|
||||
$order = $this->getHighestOrderRuleGroup();
|
||||
|
||||
@@ -233,7 +234,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function update(RuleGroup $ruleGroup, array $data)
|
||||
public function update(RuleGroup $ruleGroup, array $data): RuleGroup
|
||||
{
|
||||
// update the account:
|
||||
$ruleGroup->title = $data['title'];
|
||||
|
@@ -20,7 +20,7 @@ interface RuleGroupRepositoryInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function count();
|
||||
public function count(): int;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
@@ -28,17 +28,17 @@ interface RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null);
|
||||
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function get();
|
||||
public function get(): Collection;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderRuleGroup();
|
||||
public function getHighestOrderRuleGroup(): int;
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
@@ -52,33 +52,33 @@ interface RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveDown(RuleGroup $ruleGroup);
|
||||
public function moveDown(RuleGroup $ruleGroup): bool;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function moveUp(RuleGroup $ruleGroup);
|
||||
public function moveUp(RuleGroup $ruleGroup): bool;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRuleGroupOrder();
|
||||
public function resetRuleGroupOrder(): bool;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup);
|
||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup): bool;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data): RuleGroup;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
@@ -86,7 +86,7 @@ interface RuleGroupRepositoryInterface
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function update(RuleGroup $ruleGroup, array $data);
|
||||
public function update(RuleGroup $ruleGroup, array $data): RuleGroup;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function allCoveredByBalancingActs(Collection $accounts, Carbon $start, Carbon $end)
|
||||
public function allCoveredByBalancingActs(Collection $accounts, Carbon $start, Carbon $end): Collection
|
||||
{
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
$set = $this->user->tags()
|
||||
@@ -84,9 +84,9 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly 5.
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function connect(TransactionJournal $journal, Tag $tag)
|
||||
public function connect(TransactionJournal $journal, Tag $tag): Collection
|
||||
{
|
||||
/*
|
||||
* Already connected:
|
||||
@@ -125,7 +125,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end)
|
||||
public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string
|
||||
{
|
||||
// the quickest way to do this is by scanning all balancingAct tags
|
||||
// because there will be less of them any way.
|
||||
@@ -152,20 +152,19 @@ class TagRepository implements TagRepositoryInterface
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Tag $tag)
|
||||
public function destroy(Tag $tag): bool
|
||||
{
|
||||
$tag->delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function get()
|
||||
public function get(): Collection
|
||||
{
|
||||
/** @var Collection $tags */
|
||||
$tags = $this->user->tags()->get();
|
||||
@@ -183,7 +182,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return Tag
|
||||
*/
|
||||
public function store(array $data)
|
||||
public function store(array $data): Tag
|
||||
{
|
||||
$tag = new Tag;
|
||||
$tag->tag = $data['tag'];
|
||||
@@ -208,7 +207,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function tagAllowAdvance(Tag $tag)
|
||||
public function tagAllowAdvance(Tag $tag): bool
|
||||
{
|
||||
/*
|
||||
* If this tag is a balancing act, and it contains transfers, it cannot be
|
||||
@@ -247,7 +246,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function tagAllowBalancing(Tag $tag)
|
||||
public function tagAllowBalancing(Tag $tag): bool
|
||||
{
|
||||
/*
|
||||
* If has more than two transactions already, cannot become a balancing act:
|
||||
@@ -275,7 +274,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return Tag
|
||||
*/
|
||||
public function update(Tag $tag, array $data)
|
||||
public function update(Tag $tag, array $data): Tag
|
||||
{
|
||||
$tag->tag = $data['tag'];
|
||||
$tag->date = $data['date'];
|
||||
@@ -295,9 +294,9 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
protected function connectAdvancePayment(TransactionJournal $journal, Tag $tag)
|
||||
protected function connectAdvancePayment(TransactionJournal $journal, Tag $tag): bool
|
||||
{
|
||||
/** @var TransactionType $transfer */
|
||||
$transfer = TransactionType::whereType(TransactionType::TRANSFER)->first();
|
||||
@@ -332,7 +331,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
}
|
||||
|
||||
// this statement is unreachable.
|
||||
return false; // @codeCoverageIgnore
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@@ -340,9 +339,9 @@ class TagRepository implements TagRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
protected function connectBalancingAct(TransactionJournal $journal, Tag $tag)
|
||||
protected function connectBalancingAct(TransactionJournal $journal, Tag $tag): bool
|
||||
{
|
||||
/** @var TransactionType $withdrawal */
|
||||
$withdrawal = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();
|
||||
@@ -380,7 +379,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matchAll(TransactionJournal $journal, Tag $tag)
|
||||
protected function matchAll(TransactionJournal $journal, Tag $tag): bool
|
||||
{
|
||||
$match = true;
|
||||
/** @var TransactionJournal $check */
|
||||
|
@@ -24,15 +24,15 @@ interface TagRepositoryInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function allCoveredByBalancingActs(Collection $accounts, Carbon $start, Carbon $end);
|
||||
public function allCoveredByBalancingActs(Collection $accounts, Carbon $start, Carbon $end): Collection;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function connect(TransactionJournal $journal, Tag $tag);
|
||||
public function connect(TransactionJournal $journal, Tag $tag): bool;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -49,26 +49,26 @@ interface TagRepositoryInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end);
|
||||
public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function destroy(Tag $tag);
|
||||
public function destroy(Tag $tag): bool;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function get();
|
||||
public function get(): Collection;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @return Tag
|
||||
*/
|
||||
public function store(array $data);
|
||||
public function store(array $data): Tag;
|
||||
|
||||
/**
|
||||
* Can a tag become an advance payment?
|
||||
@@ -77,7 +77,7 @@ interface TagRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function tagAllowAdvance(Tag $tag);
|
||||
public function tagAllowAdvance(Tag $tag): bool;
|
||||
|
||||
/**
|
||||
* Can a tag become a balancing act?
|
||||
@@ -86,7 +86,7 @@ interface TagRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function tagAllowBalancing(Tag $tag);
|
||||
public function tagAllowBalancing(Tag $tag): bool;
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
@@ -94,5 +94,5 @@ interface TagRepositoryInterface
|
||||
*
|
||||
* @return Tag
|
||||
*/
|
||||
public function update(Tag $tag, array $data);
|
||||
public function update(Tag $tag, array $data): Tag;
|
||||
}
|
||||
|
Reference in New Issue
Block a user