mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Improve transformer coverage.
This commit is contained in:
@@ -160,6 +160,26 @@ class RuleRepository implements RuleRepositoryInterface
|
||||
return $rule->ruleTriggers()->where('trigger_type', 'user_action')->first()->trigger_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getRuleActions(Rule $rule): Collection
|
||||
{
|
||||
return $rule->ruleActions()->orderBy('order', 'ASC')->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getRuleTriggers(Rule $rule): Collection
|
||||
{
|
||||
return $rule->ruleTriggers()->orderBy('order', 'ASC')->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
|
||||
@@ -34,6 +34,20 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface RuleRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getRuleActions(Rule $rule): Collection;
|
||||
|
||||
/**
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getRuleTriggers(Rule $rule): Collection;
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
|
||||
Reference in New Issue
Block a user