mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-16 00:01:18 +00:00
Code reordering and reformatting. I should really start employing style CI.
This commit is contained in:
@@ -190,26 +190,15 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
->get(['rules.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderRuleGroup(): int
|
||||
{
|
||||
$entry = $this->user->ruleGroups()->max('order');
|
||||
|
||||
return (int)$entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $filter
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getRuleGroupsWithRules(?string $filter): Collection
|
||||
public function getAllRuleGroupsWithRules(?string $filter): Collection
|
||||
{
|
||||
$groups = $this->user->ruleGroups()
|
||||
->orderBy('order', 'ASC')
|
||||
->where('active', true)
|
||||
->with(
|
||||
[
|
||||
'rules' => static function (HasMany $query) {
|
||||
@@ -253,15 +242,26 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestOrderRuleGroup(): int
|
||||
{
|
||||
$entry = $this->user->ruleGroups()->max('order');
|
||||
|
||||
return (int)$entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $filter
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllRuleGroupsWithRules(?string $filter): Collection
|
||||
public function getRuleGroupsWithRules(?string $filter): Collection
|
||||
{
|
||||
$groups = $this->user->ruleGroups()
|
||||
->orderBy('order', 'ASC')
|
||||
->where('active', true)
|
||||
->with(
|
||||
[
|
||||
'rules' => static function (HasMany $query) {
|
||||
|
||||
@@ -102,6 +102,15 @@ interface RuleGroupRepositoryInterface
|
||||
*/
|
||||
public function getActiveUpdateRules(RuleGroup $group): Collection;
|
||||
|
||||
/**
|
||||
* Also inactive groups.
|
||||
*
|
||||
* @param string|null $filter
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllRuleGroupsWithRules(?string $filter): Collection;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@@ -114,15 +123,6 @@ interface RuleGroupRepositoryInterface
|
||||
*/
|
||||
public function getRuleGroupsWithRules(?string $filter): Collection;
|
||||
|
||||
/**
|
||||
* Also inactive groups.
|
||||
*
|
||||
* @param string|null $filter
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllRuleGroupsWithRules(?string $filter): Collection;
|
||||
|
||||
/**
|
||||
* @param RuleGroup $group
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user