mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some code cleanup. Fixes the tests.
This commit is contained in:
@@ -174,9 +174,9 @@ class BillController extends Controller
|
||||
*/
|
||||
public function show(BillRepositoryInterface $repository, Bill $bill)
|
||||
{
|
||||
$page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page'));
|
||||
$pageSize = Preferences::get('transactionPageSize', 50)->data;
|
||||
$journals = $repository->getJournals($bill, $page, $pageSize);
|
||||
$page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page'));
|
||||
$pageSize = Preferences::get('transactionPageSize', 50)->data;
|
||||
$journals = $repository->getJournals($bill, $page, $pageSize);
|
||||
$journals->setPath('/bills/show/' . $bill->id);
|
||||
$bill->nextExpectedMatch = $repository->nextExpectedMatch($bill);
|
||||
$hideBill = true;
|
||||
|
@@ -149,7 +149,6 @@ class BudgetController extends Controller
|
||||
$budgeted = '0';
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$repeatFreq = Config::get('firefly.range_to_repeat_freq.' . $range);
|
||||
/** @var Carbon $date */
|
||||
/** @var Carbon $start */
|
||||
$start = session('start', new Carbon);
|
||||
/** @var Carbon $end */
|
||||
|
@@ -7,7 +7,6 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Response;
|
||||
|
||||
|
||||
|
@@ -100,9 +100,9 @@ class ReportController extends Controller
|
||||
break;
|
||||
case ($role === BalanceLine::ROLE_DIFFROLE):
|
||||
// journals no budget, not corrected by a tag.
|
||||
$journals = $budgetRepository->getAllWithoutBudget($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||
$journals = $budgetRepository->getAllWithoutBudget($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||
$budget->name = strval(trans('firefly.leftUnbalanced'));
|
||||
$journals = $journals->filter(
|
||||
$journals = $journals->filter(
|
||||
function (TransactionJournal $journal) {
|
||||
$tags = $journal->tags()->where('tagMode', 'balancingAct')->count();
|
||||
if ($tags === 0) {
|
||||
|
@@ -138,7 +138,7 @@ class PreferencesController extends Controller
|
||||
|
||||
// save page size:
|
||||
$transactionPageSize = intval(Input::get('transactionPageSize'));
|
||||
if($transactionPageSize > 0 && $transactionPageSize < 1337) {
|
||||
if ($transactionPageSize > 0 && $transactionPageSize < 1337) {
|
||||
Preferences::set('transactionPageSize', $transactionPageSize);
|
||||
} else {
|
||||
Preferences::set('transactionPageSize', 50);
|
||||
|
@@ -36,15 +36,16 @@ class Kernel extends HttpKernel
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $bootstrappers = [
|
||||
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
|
||||
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
|
||||
'FireflyIII\Bootstrap\ConfigureLogging',
|
||||
'Illuminate\Foundation\Bootstrap\HandleExceptions',
|
||||
'Illuminate\Foundation\Bootstrap\RegisterFacades',
|
||||
'Illuminate\Foundation\Bootstrap\RegisterProviders',
|
||||
'Illuminate\Foundation\Bootstrap\BootProviders',
|
||||
];
|
||||
protected $bootstrappers
|
||||
= [
|
||||
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
|
||||
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
|
||||
'FireflyIII\Bootstrap\ConfigureLogging',
|
||||
'Illuminate\Foundation\Bootstrap\HandleExceptions',
|
||||
'Illuminate\Foundation\Bootstrap\RegisterFacades',
|
||||
'Illuminate\Foundation\Bootstrap\RegisterProviders',
|
||||
'Illuminate\Foundation\Bootstrap\BootProviders',
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
@@ -144,7 +145,7 @@ class Kernel extends HttpKernel
|
||||
// MUST be confirmed.
|
||||
// MUST have owner role
|
||||
// (this group includes the other Firefly middleware)
|
||||
'admin' => [
|
||||
'admin' => [
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
|
Reference in New Issue
Block a user