mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Code reordering and reformatting. I should really start employing style CI.
This commit is contained in:
@@ -27,6 +27,7 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use JsonException;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -44,7 +45,7 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -55,7 +56,7 @@ class AccountController extends Controller
|
||||
$cache->addProperty('account-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var AccountTaskerInterface $accountTasker */
|
||||
|
||||
@@ -53,7 +53,7 @@ class BillController extends Controller
|
||||
$cache->addProperty('bill-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
/** @var ReportHelperInterface $helper */
|
||||
$helper = app(ReportHelperInterface::class);
|
||||
|
||||
@@ -36,6 +36,7 @@ use FireflyIII\Support\Report\Budget\BudgetReportGenerator;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -307,7 +308,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -317,7 +318,7 @@ class BudgetController extends Controller
|
||||
$cache->addProperty('budget-period-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$periods = app('navigation')->listOfPeriods($start, $end);
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Report\Category\CategoryReportGenerator;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -488,7 +489,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -498,7 +499,7 @@ class CategoryController extends Controller
|
||||
$cache->addProperty('category-period-expenses-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
// depending on the carbon format (a reliable way to determine the general date difference)
|
||||
@@ -569,7 +570,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
@@ -579,7 +580,7 @@ class CategoryController extends Controller
|
||||
$cache->addProperty('category-period-income-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
// depending on the carbon format (a reliable way to determine the general date difference)
|
||||
@@ -648,7 +649,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -659,7 +660,7 @@ class CategoryController extends Controller
|
||||
$cache->addProperty('category-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var CategoryReportGenerator $generator */
|
||||
@@ -678,6 +679,7 @@ class CategoryController extends Controller
|
||||
Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
|
||||
$result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ class DoubleController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* See reference nr. 67
|
||||
* See reference nr. 67
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param int $id
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use JsonException;
|
||||
use Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -66,7 +67,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -77,7 +78,7 @@ class OperationsController extends Controller
|
||||
$cache->addProperty('expense-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
$report = $this->tasker->getExpenseReport($start, $end, $accounts);
|
||||
$type = 'expense-entry';
|
||||
@@ -102,7 +103,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function income(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
@@ -113,7 +114,7 @@ class OperationsController extends Controller
|
||||
$cache->addProperty('income-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
$report = $this->tasker->getIncomeReport($start, $end, $accounts);
|
||||
$type = 'income-entry';
|
||||
@@ -138,7 +139,7 @@ class OperationsController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -149,7 +150,7 @@ class OperationsController extends Controller
|
||||
$cache->addProperty('inc-exp-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$incomes = $this->tasker->getIncomeReport($start, $end, $accounts);
|
||||
|
||||
Reference in New Issue
Block a user