Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -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) {

View File

@@ -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
*