mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various code cleanup.
This commit is contained in:
parent
62e41f1997
commit
e8dfbff73f
@ -34,6 +34,7 @@ class RequestedNewPassword extends Event
|
|||||||
*
|
*
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param string $token
|
* @param string $token
|
||||||
|
* @param string $ipAddress
|
||||||
*/
|
*/
|
||||||
public function __construct(User $user, string $token, string $ipAddress)
|
public function __construct(User $user, string $token, string $ipAddress)
|
||||||
{
|
{
|
||||||
|
@ -251,6 +251,7 @@ class AccountController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param ARI $repository
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
@ -75,7 +75,8 @@ class LoginController extends Controller
|
|||||||
// If the class is using the ThrottlesLogins trait, we can automatically throttle
|
// If the class is using the ThrottlesLogins trait, we can automatically throttle
|
||||||
// the login attempts for this application. We'll key this by the username and
|
// the login attempts for this application. We'll key this by the username and
|
||||||
// the IP address of the client making these requests into this application.
|
// the IP address of the client making these requests into this application.
|
||||||
if ($lockedOut = $this->hasTooManyLoginAttempts($request)) {
|
$lockedOut = $this->hasTooManyLoginAttempts($request);
|
||||||
|
if ($lockedOut) {
|
||||||
$this->fireLockoutEvent($request);
|
$this->fireLockoutEvent($request);
|
||||||
|
|
||||||
return $this->sendLockoutResponse($request);
|
return $this->sendLockoutResponse($request);
|
||||||
|
@ -326,26 +326,30 @@ class BudgetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param BudgetRepositoryInterface $repository
|
* @param Budget $budget
|
||||||
* @param AccountRepositoryInterface $accountRepository
|
* @param LimitRepetition $repetition
|
||||||
* @param Budget $budget
|
|
||||||
* @param LimitRepetition $repetition
|
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function showWithRepetition(
|
public function showWithRepetition(Budget $budget, LimitRepetition $repetition)
|
||||||
BudgetRepositoryInterface $repository, AccountRepositoryInterface $accountRepository, Budget $budget, LimitRepetition $repetition
|
{
|
||||||
) {
|
|
||||||
if ($repetition->budgetLimit->budget->id != $budget->id) {
|
if ($repetition->budgetLimit->budget->id != $budget->id) {
|
||||||
throw new FireflyException('This budget limit is not part of this budget.');
|
throw new FireflyException('This budget limit is not part of this budget.');
|
||||||
}
|
}
|
||||||
$start = $repetition->startdate;
|
|
||||||
$end = $repetition->enddate;
|
/** @var BudgetRepositoryInterface $repository */
|
||||||
$page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page'));
|
$repository = app(BudgetRepositoryInterface::class);
|
||||||
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
$subTitle = trans('firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]);
|
$accountRepository = app(AccountRepositoryInterface::class);
|
||||||
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
$start = $repetition->startdate;
|
||||||
|
$end = $repetition->enddate;
|
||||||
|
$page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page'));
|
||||||
|
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
|
||||||
|
$subTitle = trans(
|
||||||
|
'firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]
|
||||||
|
);
|
||||||
|
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]);
|
||||||
|
|
||||||
|
|
||||||
// collector:
|
// collector:
|
||||||
|
@ -203,9 +203,12 @@ class AccountController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param JournalCollectorInterface $collector
|
||||||
* @param Carbon $start
|
* @param Account $account
|
||||||
* @param Carbon $end
|
* @param Carbon $start
|
||||||
|
* @param Carbon $end
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@ -53,8 +53,9 @@ class TransactionController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param string $what
|
* @param JournalRepositoryInterface $repository
|
||||||
|
* @param string $what
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
@ -141,6 +142,8 @@ class TransactionController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param string $what
|
* @param string $what
|
||||||
*
|
*
|
||||||
|
* @param string $date
|
||||||
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function indexDate(Request $request, string $what, string $date)
|
public function indexDate(Request $request, string $what, string $date)
|
||||||
|
@ -15,7 +15,6 @@ namespace FireflyIII\Models;
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use DB;
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||||
|
@ -59,7 +59,7 @@ class Preferences
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param User $user
|
* @param \FireflyIII\User $user
|
||||||
* @param array $list
|
* @param array $list
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
Loading…
Reference in New Issue
Block a user