Removed a method no longer necessary.

This commit is contained in:
James Cole 2016-10-05 16:09:37 +02:00
parent b355c18e0c
commit 5540697dbd
4 changed files with 10 additions and 33 deletions

View File

@ -22,7 +22,6 @@ use FireflyIII\Export\Processor;
use FireflyIII\Http\Requests\ExportFormRequest; use FireflyIII\Http\Requests\ExportFormRequest;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Models\ExportJob; use FireflyIII\Models\ExportJob;
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI; use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI;
use Preferences; use Preferences;
use Response; use Response;
@ -118,19 +117,19 @@ class ExportController extends Controller
/** /**
* @param ExportFormRequest $request * @param ExportFormRequest $request
* @param ARI $repository * @param AccountCrudInterface $crud
* *
* @param EJRI $jobs * @param EJRI $jobs
* *
* @return string * @return string
* @throws \FireflyIII\Exceptions\FireflyException * @throws \FireflyIII\Exceptions\FireflyException
*/ */
public function postIndex(ExportFormRequest $request, ARI $repository, EJRI $jobs) public function postIndex(ExportFormRequest $request, AccountCrudInterface $crud, EJRI $jobs)
{ {
set_time_limit(0); set_time_limit(0);
$job = $jobs->findByKey($request->get('job')); $job = $jobs->findByKey($request->get('job'));
$settings = [ $settings = [
'accounts' => $repository->get($request->get('accounts')), 'accounts' => $crud->getAccountsById($request->get('accounts')),
'startDate' => new Carbon($request->get('export_start_range')), 'startDate' => new Carbon($request->get('export_start_range')),
'endDate' => new Carbon($request->get('export_end_range')), 'endDate' => new Carbon($request->get('export_end_range')),
'exportFormat' => $request->get('exportFormat'), 'exportFormat' => $request->get('exportFormat'),

View File

@ -21,7 +21,6 @@ use FireflyIII\Http\Requests\SelectTransactionsRequest;
use FireflyIII\Jobs\ExecuteRuleGroupOnExistingTransactions; use FireflyIII\Jobs\ExecuteRuleGroupOnExistingTransactions;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Models\RuleGroup; use FireflyIII\Models\RuleGroup;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use Input; use Input;
use Preferences; use Preferences;
@ -148,15 +147,15 @@ class RuleGroupController extends Controller
* Execute the given rulegroup on a set of existing transactions * Execute the given rulegroup on a set of existing transactions
* *
* @param SelectTransactionsRequest $request * @param SelectTransactionsRequest $request
* @param AccountRepositoryInterface $repository * @param AccountCrudInterface $crud
* @param RuleGroup $ruleGroup * @param RuleGroup $ruleGroup
* *
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
*/ */
public function execute(SelectTransactionsRequest $request, AccountRepositoryInterface $repository, RuleGroup $ruleGroup) public function execute(SelectTransactionsRequest $request, AccountCrudInterface $crud, RuleGroup $ruleGroup)
{ {
// Get parameters specified by the user // Get parameters specified by the user
$accounts = $repository->get($request->get('accounts')); $accounts = $crud->getAccountsById($request->get('accounts'));
$startDate = new Carbon($request->get('start_date')); $startDate = new Carbon($request->get('start_date'));
$endDate = new Carbon($request->get('end_date')); $endDate = new Carbon($request->get('end_date'));

View File

@ -227,18 +227,6 @@ class AccountRepository implements AccountRepositoryInterface
return $first; return $first;
} }
/**
* Gets all the accounts by ID, for a given set.
*
* @param array $ids
*
* @return \Illuminate\Support\Collection
*/
public function get(array $ids): Collection
{
return $this->user->accounts()->whereIn('id', $ids)->get(['accounts.*']);
}
/** /**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* @param Account $account * @param Account $account

View File

@ -79,15 +79,6 @@ interface AccountRepositoryInterface
*/ */
public function firstUseDate(Account $account): Carbon; public function firstUseDate(Account $account): Carbon;
/**
* Gets all the accounts by ID, for a given set.
*
* @param array $ids
*
* @return \Illuminate\Support\Collection
*/
public function get(array $ids): Collection;
/** /**
* @param TransactionJournal $journal * @param TransactionJournal $journal
* @param Account $account * @param Account $account