Some code cleanup courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 17:38:09 +01:00
parent a755badd5f
commit 820722f44e
24 changed files with 226 additions and 164 deletions

View File

@@ -25,7 +25,7 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate
*/
public function countJournals(Category $category)
{
return $category->transactionJournals()->count();
return $category->transactionjournals()->count();
}
@@ -39,7 +39,7 @@ class SingleCategoryRepository extends ComponentRepository implements SingleCate
*/
public function countJournalsInRange(Category $category, Carbon $start, Carbon $end)
{
return $category->transactionJournals()->before($end)->after($start)->count();
return $category->transactionjournals()->before($end)->after($start)->count();
}
/**

View File

@@ -8,6 +8,11 @@ use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use Illuminate\Support\Collection;
/**
* Class RuleGroupRepository
*
* @package FireflyIII\Repositories\RuleGroup
*/
class RuleGroupRepository implements RuleGroupRepositoryInterface
{
/**

View File

@@ -52,6 +52,8 @@ interface RuleGroupRepositoryInterface
public function resetRuleGroupOrder();
/**
* @param RuleGroup $ruleGroup
*
* @return bool
*/
public function resetRulesInGroupOrder(RuleGroup $ruleGroup);

View File

@@ -35,7 +35,7 @@ class ComponentRepository
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->whereIn('accounts.id', $ids)
->after($start)
->first([DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
->first([DB::raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
$amount = $entry->journalAmount;
return $amount;