mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Move stuff to request classes for #339
This commit is contained in:
@@ -79,6 +79,21 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $ruleGroupId
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function find(int $ruleGroupId): RuleGroup
|
||||
{
|
||||
$group = $this->user->ruleGroups()->find($ruleGroupId);
|
||||
if (is_null($group)) {
|
||||
return new RuleGroup;
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
|
@@ -42,6 +42,13 @@ interface RuleGroupRepositoryInterface
|
||||
*/
|
||||
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool;
|
||||
|
||||
/**
|
||||
* @param int $ruleGroupId
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public function find(int $ruleGroupId): RuleGroup;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
|
Reference in New Issue
Block a user