mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Shorter method names.
This commit is contained in:
@@ -16,7 +16,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function destroyRuleGroup(RuleGroup $ruleGroup, RuleGroup $moveTo = null)
|
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null)
|
||||||
{
|
{
|
||||||
/** @var Rule $rule */
|
/** @var Rule $rule */
|
||||||
foreach ($ruleGroup->rules as $rule) {
|
foreach ($ruleGroup->rules as $rule) {
|
||||||
@@ -55,7 +55,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function getRuleGroups()
|
public function get()
|
||||||
{
|
{
|
||||||
return Auth::user()->ruleGroups()->orderBy('order', 'ASC')->get();
|
return Auth::user()->ruleGroups()->orderBy('order', 'ASC')->get();
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function moveRuleGroupUp(RuleGroup $ruleGroup)
|
public function moveUp(RuleGroup $ruleGroup)
|
||||||
{
|
{
|
||||||
$order = $ruleGroup->order;
|
$order = $ruleGroup->order;
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function moveRuleGroupDown(RuleGroup $ruleGroup)
|
public function moveDown(RuleGroup $ruleGroup)
|
||||||
{
|
{
|
||||||
$order = $ruleGroup->order;
|
$order = $ruleGroup->order;
|
||||||
|
|
||||||
@@ -126,6 +126,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function resetRulesInGroupOrder(RuleGroup $ruleGroup)
|
public function resetRulesInGroupOrder(RuleGroup $ruleGroup)
|
||||||
@@ -153,7 +154,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return RuleGroup
|
* @return RuleGroup
|
||||||
*/
|
*/
|
||||||
public function storeRuleGroup(array $data)
|
public function store(array $data)
|
||||||
{
|
{
|
||||||
$order = $this->getHighestOrderRuleGroup();
|
$order = $this->getHighestOrderRuleGroup();
|
||||||
|
|
||||||
@@ -180,7 +181,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return RuleGroup
|
* @return RuleGroup
|
||||||
*/
|
*/
|
||||||
public function updateRuleGroup(RuleGroup $ruleGroup, array $data)
|
public function update(RuleGroup $ruleGroup, array $data)
|
||||||
{
|
{
|
||||||
// update the account:
|
// update the account:
|
||||||
$ruleGroup->title = $data['title'];
|
$ruleGroup->title = $data['title'];
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ namespace FireflyIII\Repositories\RuleGroup;
|
|||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface RuleGroupRepositoryInterface
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Repositories\RuleGroup
|
||||||
|
*/
|
||||||
interface RuleGroupRepositoryInterface
|
interface RuleGroupRepositoryInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -14,8 +19,7 @@ interface RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function destroyRuleGroup(RuleGroup $ruleGroup, RuleGroup $moveTo = null);
|
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,19 +30,21 @@ interface RuleGroupRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function getRuleGroups();
|
public function get();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function moveRuleGroupUp(RuleGroup $ruleGroup);
|
public function moveUp(RuleGroup $ruleGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function moveRuleGroupDown(RuleGroup $ruleGroup);
|
public function moveDown(RuleGroup $ruleGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -55,8 +61,7 @@ interface RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return RuleGroup
|
* @return RuleGroup
|
||||||
*/
|
*/
|
||||||
public function storeRuleGroup(array $data);
|
public function store(array $data);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
@@ -64,7 +69,7 @@ interface RuleGroupRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return RuleGroup
|
* @return RuleGroup
|
||||||
*/
|
*/
|
||||||
public function updateRuleGroup(RuleGroup $ruleGroup, array $data);
|
public function update(RuleGroup $ruleGroup, array $data);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user