Some code cleanup [skip ci]

This commit is contained in:
James Cole
2016-02-07 07:56:58 +01:00
parent b22774a599
commit 9429d84cf8
21 changed files with 65 additions and 55 deletions

View File

@@ -65,7 +65,7 @@ class AccountController extends Controller
{
$typeName = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
$subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]);
$accountList = Expandedform::makeSelectList($repository->getAccounts([$account->accountType->type]), true);
$accountList = ExpandedForm::makeSelectList($repository->getAccounts([$account->accountType->type]), true);
unset($accountList[$account->id]);
// put previous url in session

View File

@@ -5,6 +5,7 @@ namespace FireflyIII\Http\Controllers;
use Crypt;
use File;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Requests\AttachmentFormRequest;
use FireflyIII\Models\Attachment;
@@ -73,7 +74,8 @@ class AttachmentController extends Controller
* @param Attachment $attachment
* @param AttachmentHelperInterface $helper
*
* @return string
* @throws FireflyException
*
*/
public function download(Attachment $attachment, AttachmentHelperInterface $helper)
{
@@ -95,9 +97,8 @@ class AttachmentController extends Controller
->header('Pragma', 'public')
->header('Content-Length', $attachment->size);
} else {
abort(404);
}
throw new FireflyException('Could not find the indicated attachment. The file is no longer there.');
}
/**

View File

@@ -73,12 +73,13 @@ class ReportController extends Controller
}
/**
* @param $reportType
* @param string $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return View
* @throws FireflyException
*/
public function report(string $reportType, Carbon $start, Carbon $end, Collection $accounts)
{

View File

@@ -60,7 +60,7 @@ class RuleGroupController extends Controller
{
$subTitle = trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]);
$ruleGroupList = Expandedform::makeSelectList($repository->get(), true);
$ruleGroupList = ExpandedForm::makeSelectList($repository->get(), true);
unset($ruleGroupList[$ruleGroup->id]);
// put previous url in session

View File

@@ -137,6 +137,7 @@ class TransactionController extends Controller
* @param TransactionJournal $journal
*
* @return $this
* @throws FireflyException
*/
public function edit(ARI $repository, TransactionJournal $journal)
{