diff --git a/app/Events/RequestedNewPassword.php b/app/Events/RequestedNewPassword.php index 89e6455202..7956cc8613 100644 --- a/app/Events/RequestedNewPassword.php +++ b/app/Events/RequestedNewPassword.php @@ -34,6 +34,7 @@ class RequestedNewPassword extends Event * * @param User $user * @param string $token + * @param string $ipAddress */ public function __construct(User $user, string $token, string $ipAddress) { diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 8ebc14802d..e750801963 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -251,6 +251,7 @@ class AccountController extends Controller } /** + * @param ARI $repository * @param Account $account * * @return View diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 4d39b49247..fd38a15187 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -75,7 +75,8 @@ class LoginController extends Controller // 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 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); return $this->sendLockoutResponse($request); diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index d8f18646e4..f205bf1483 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -326,26 +326,30 @@ class BudgetController extends Controller } /** - * @param BudgetRepositoryInterface $repository - * @param AccountRepositoryInterface $accountRepository - * @param Budget $budget - * @param LimitRepetition $repetition + * @param Budget $budget + * @param LimitRepetition $repetition * * @return View * @throws FireflyException */ - public function showWithRepetition( - BudgetRepositoryInterface $repository, AccountRepositoryInterface $accountRepository, Budget $budget, LimitRepetition $repetition - ) { + public function showWithRepetition(Budget $budget, LimitRepetition $repetition) + { if ($repetition->budgetLimit->budget->id != $budget->id) { throw new FireflyException('This budget limit is not part of this budget.'); } - $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]); + + /** @var BudgetRepositoryInterface $repository */ + $repository = app(BudgetRepositoryInterface::class); + /** @var AccountRepositoryInterface $accountRepository */ + $accountRepository = app(AccountRepositoryInterface::class); + $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: diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 1b21d83905..c0e8071327 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -203,9 +203,12 @@ class AccountController extends Controller } /** - * @param Account $account - * @param Carbon $start - * @param Carbon $end + * @param JournalCollectorInterface $collector + * @param Account $account + * @param Carbon $start + * @param Carbon $end + * + * @return \Illuminate\Http\JsonResponse */ public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index b8e269be0a..36214cf76c 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -53,8 +53,9 @@ class TransactionController extends Controller } /** - * @param Request $request - * @param string $what + * @param Request $request + * @param JournalRepositoryInterface $repository + * @param string $what * * @return View */ @@ -141,6 +142,8 @@ class TransactionController extends Controller * @param Request $request * @param string $what * + * @param string $date + * * @return View */ public function indexDate(Request $request, string $what, string $date) diff --git a/app/Models/Account.php b/app/Models/Account.php index db6f7dffae..43547de497 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -15,7 +15,6 @@ namespace FireflyIII\Models; use Carbon\Carbon; use Crypt; -use DB; use FireflyIII\Exceptions\FireflyException; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index ef653e2563..30f258a569 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -59,7 +59,7 @@ class Preferences } /** - * @param User $user + * @param \FireflyIII\User $user * @param array $list * * @return array