Code cleanup that (hopefully) matches style CI

This commit is contained in:
James Cole
2020-03-17 15:01:00 +01:00
parent bd2f064eeb
commit 2b6c3fd743
110 changed files with 2060 additions and 1660 deletions

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -56,6 +55,7 @@ class ReconcileController extends Controller
/**
* ReconcileController constructor.
*
* @codeCoverageIgnore
*/
public function __construct()
@@ -66,7 +66,7 @@ class ReconcileController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('mainTitleIcon', 'fa-credit-card');
app('view')->share('title', (string)trans('firefly.accounts'));
app('view')->share('title', (string) trans('firefly.accounts'));
$this->repository = app(JournalRepositoryInterface::class);
$this->accountRepos = app(AccountRepositoryInterface::class);
$this->currencyRepos = app(CurrencyRepositoryInterface::class);
@@ -81,8 +81,8 @@ class ReconcileController extends Controller
*
* @param Request $request
* @param Account $account
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
*
* @return JsonResponse
*/
@@ -141,11 +141,22 @@ class ReconcileController extends Controller
try {
$view = view(
'accounts.reconcile.overview', compact(
'account', 'start', 'diffCompare', 'difference', 'end', 'clearedAmount',
'startBalance', 'endBalance', 'amount',
'route', 'countCleared', 'reconSum', 'selectedIds'
)
'accounts.reconcile.overview',
compact(
'account',
'start',
'diffCompare',
'difference',
'end',
'clearedAmount',
'startBalance',
'endBalance',
'amount',
'route',
'countCleared',
'reconSum',
'selectedIds'
)
)->render();
// @codeCoverageIgnoreStart
} catch (Throwable $e) {
@@ -168,8 +179,8 @@ class ReconcileController extends Controller
* Returns a list of transactions in a modal.
*
* @param Account $account
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
*
* @return mixed
*
@@ -231,8 +242,10 @@ class ReconcileController extends Controller
}
try {
$html = view('accounts.reconcile.transactions',
compact('account', 'journals', 'currency', 'start', 'end', 'selectionStart', 'selectionEnd'))->render();
$html = view(
'accounts.reconcile.transactions',
compact('account', 'journals', 'currency', 'start', 'end', 'selectionStart', 'selectionEnd')
)->render();
// @codeCoverageIgnoreStart
} catch (Throwable $e) {
Log::debug(sprintf('Could not render: %s', $e->getMessage()));
@@ -245,10 +258,11 @@ class ReconcileController extends Controller
}
/**
* @param Account $account
* @param Account $account
* @param TransactionCurrency $currency
* @param array $journal
* @param string $amount
* @param array $journal
* @param string $amount
*
* @return string
*/
private function processJournal(Account $account, TransactionCurrency $currency, array $journal, string $amount): string