Code cleanup

This commit is contained in:
James Cole
2024-12-22 08:43:12 +01:00
parent 5751f7e5a3
commit 565bd87959
574 changed files with 4600 additions and 4604 deletions

View File

@@ -61,7 +61,7 @@ class RuleRepository implements RuleRepositoryInterface
public function duplicate(Rule $rule): Rule
{
$newRule = $rule->replicate();
$newRule->title = (string)trans('firefly.rule_copy_of', ['title' => $rule->title]);
$newRule->title = (string) trans('firefly.rule_copy_of', ['title' => $rule->title]);
$newRule->save();
// replicate all triggers
@@ -101,7 +101,7 @@ class RuleRepository implements RuleRepositoryInterface
public function getHighestOrderInRuleGroup(RuleGroup $ruleGroup): int
{
return (int)$ruleGroup->rules()->max('order');
return (int) $ruleGroup->rules()->max('order');
}
/**
@@ -352,7 +352,7 @@ class RuleRepository implements RuleRepositoryInterface
public function maxOrder(RuleGroup $ruleGroup): int
{
return (int)$ruleGroup->rules()->max('order');
return (int) $ruleGroup->rules()->max('order');
}
private function storeTriggers(Rule $rule, array $data): void
@@ -477,7 +477,7 @@ class RuleRepository implements RuleRepositoryInterface
// update the order:
$this->resetRuleOrder($group);
if (array_key_exists('order', $data)) {
$this->moveRule($rule, $group, (int)$data['order']);
$this->moveRule($rule, $group, (int) $data['order']);
}
// update the triggers: