Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -29,16 +29,9 @@ use FireflyIII\Models\RuleAction;
/**
* Trait BillServiceTrait
*
*/
trait BillServiceTrait
{
/**
* @param Bill $bill
* @param string $oldName
* @param string $newName
*/
public function updateBillActions(Bill $bill, string $oldName, string $newName): void
{
if ($oldName === $newName) {
@@ -46,8 +39,9 @@ trait BillServiceTrait
}
$ruleIds = $bill->user->rules()->get(['id'])->pluck('id')->toArray();
$set = RuleAction::whereIn('rule_id', $ruleIds)
->where('action_type', 'link_to_bill')
->where('action_value', $oldName)->get();
->where('action_type', 'link_to_bill')
->where('action_value', $oldName)->get()
;
/** @var RuleAction $ruleAction */
foreach ($set as $ruleAction) {
@@ -57,12 +51,6 @@ trait BillServiceTrait
}
}
/**
* @param Bill $bill
* @param string $note
*
* @return bool
*/
public function updateNote(Bill $bill, string $note): bool
{
if ('' === $note) {