mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Update PHP doc everywhere.
This commit is contained in:
parent
5ca4f1b181
commit
02f5eddd14
@ -97,35 +97,15 @@ class BudgetLimitController extends Controller
|
||||
$baseUrl = $request->getSchemeAndHttpHost() . '/api/v1';
|
||||
$budgetId = (int)($request->get('budget_id') ?? 0);
|
||||
$budget = $this->repository->findNull($budgetId);
|
||||
$start = null;
|
||||
$end = null;
|
||||
$this->parameters->set('budget_id', $budgetId);
|
||||
|
||||
|
||||
try {
|
||||
$start = Carbon::createFromFormat('Y-m-d', $request->get('start'));
|
||||
$this->parameters->set('start', $start->format('Y-m-d'));
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Log::debug(sprintf('Invalid date: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
try {
|
||||
$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
|
||||
$this->parameters->set('end', $end->format('Y-m-d'));
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Log::debug(sprintf('Invalid date: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
$this->parameters->set('budget_id', $budgetId);
|
||||
|
||||
$collection = new Collection;
|
||||
if (null === $budget) {
|
||||
/** @noinspection PhpUndefinedVariableInspection */
|
||||
$collection = $this->repository->getAllBudgetLimits($start, $end);
|
||||
$collection = $this->repository->getAllBudgetLimits($this->parameters->get('start'), $this->parameters->get('end'));
|
||||
}
|
||||
if (null !== $budget) {
|
||||
/** @noinspection PhpUndefinedVariableInspection */
|
||||
$collection = $this->repository->getBudgetLimits($budget, $start, $end);
|
||||
$collection = $this->repository->getBudgetLimits($budget, $this->parameters->get('start'), $this->parameters->get('end'));
|
||||
}
|
||||
|
||||
$count = $collection->count();
|
||||
|
@ -55,6 +55,8 @@ class ConfigurationController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show configuration index.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
@ -75,6 +77,8 @@ class ConfigurationController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store new configuration values.
|
||||
*
|
||||
* @param ConfigurationRequest $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
|
@ -46,6 +46,8 @@ class HomeController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Index of the admin.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
@ -58,6 +60,8 @@ class HomeController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a test message to the admin.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
|
@ -36,7 +36,7 @@ use View;
|
||||
class LinkController extends Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
* LinkController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -54,6 +54,7 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a new link form.
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function create()
|
||||
@ -70,6 +71,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a link form.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param LinkTypeRepositoryInterface $repository
|
||||
* @param LinkType $linkType
|
||||
@ -102,6 +105,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually destroy the link.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param LinkTypeRepositoryInterface $repository
|
||||
* @param LinkType $linkType
|
||||
@ -121,6 +126,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a link form.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param LinkType $linkType
|
||||
*
|
||||
@ -146,6 +153,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show index of all links.
|
||||
*
|
||||
* @param LinkTypeRepositoryInterface $repository
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -165,6 +174,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a single link.
|
||||
*
|
||||
* @param LinkType $linkType
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -179,6 +190,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the new link.
|
||||
*
|
||||
* @param LinkTypeFormRequest $request
|
||||
* @param LinkTypeRepositoryInterface $repository
|
||||
*
|
||||
@ -206,6 +219,8 @@ class LinkController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing link.
|
||||
*
|
||||
* @param LinkTypeFormRequest $request
|
||||
* @param LinkTypeRepositoryInterface $repository
|
||||
* @param LinkType $linkType
|
||||
|
@ -56,6 +56,8 @@ class UpdateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show page with update options.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
@ -76,6 +78,8 @@ class UpdateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Post new settings.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
|
@ -36,7 +36,7 @@ use Log;
|
||||
class UserController extends Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
* UserController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -55,6 +55,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a user.
|
||||
*
|
||||
* @param User $user
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -67,6 +69,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy a user.
|
||||
*
|
||||
* @param User $user
|
||||
* @param UserRepositoryInterface $repository
|
||||
*
|
||||
@ -81,6 +85,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit user form.
|
||||
*
|
||||
* @param User $user
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -106,6 +112,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show index of user manager.
|
||||
*
|
||||
* @param UserRepositoryInterface $repository
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -133,6 +141,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show single user.
|
||||
*
|
||||
* @param UserRepositoryInterface $repository
|
||||
* @param User $user
|
||||
*
|
||||
@ -154,6 +164,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update single user.
|
||||
*
|
||||
* @param UserFormRequest $request
|
||||
* @param User $user
|
||||
* @param UserRepositoryInterface $repository
|
||||
|
@ -36,17 +36,6 @@ use Illuminate\Support\Facades\Password;
|
||||
*/
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
@ -93,6 +82,8 @@ class ForgotPasswordController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show form for email recovery.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
|
@ -60,6 +60,8 @@ class LoginController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Log in a user.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response|void
|
||||
|
@ -36,6 +36,8 @@ use Log;
|
||||
class TwoFactorController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show 2FA screen.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
||||
@ -67,6 +69,8 @@ class TwoFactorController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* What to do if 2FA lost?
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function lostTwoFactor()
|
||||
@ -86,6 +90,8 @@ class TwoFactorController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit 2FA code.
|
||||
*
|
||||
* @param TokenFormRequest $request
|
||||
* @param CookieJar $cookieJar
|
||||
*
|
||||
|
@ -38,17 +38,16 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
*
|
||||
* Class AmountController
|
||||
*/
|
||||
class AmountController extends Controller
|
||||
{
|
||||
use DateCalculation;
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* AmountController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -69,6 +68,8 @@ class AmountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Set the amount for a single budget in a specific period. Shows a waring when its a lot.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
* @param Budget $budget
|
||||
@ -122,6 +123,8 @@ class AmountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows some basic info about the income and the suggested budget.
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
@ -169,6 +172,8 @@ class AmountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store an available budget for the current period.
|
||||
*
|
||||
* @param BudgetIncomeRequest $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
@ -188,6 +193,8 @@ class AmountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the form to update available budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
|
@ -35,11 +35,11 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class CreateController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* CreateController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -60,6 +60,8 @@ class CreateController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Form to create a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -78,6 +80,8 @@ class CreateController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Stores a budget.
|
||||
*
|
||||
* @param BudgetFormRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
|
@ -35,11 +35,11 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class DeleteController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* DeleteController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -60,6 +60,8 @@ class DeleteController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -75,6 +77,8 @@ class DeleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
|
@ -37,11 +37,11 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class EditController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* EditController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -61,6 +61,8 @@ class EditController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Budget edit form.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
@ -87,6 +89,8 @@ class EditController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Budget update routine.
|
||||
*
|
||||
* @param BudgetFormRequest $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
|
@ -41,11 +41,11 @@ class IndexController extends Controller
|
||||
{
|
||||
|
||||
use DateCalculation;
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* IndexController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -66,6 +66,10 @@ class IndexController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Show all budgets.
|
||||
*
|
||||
* TODO remove moment routine.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string|null $moment
|
||||
*
|
||||
|
@ -44,11 +44,11 @@ use Illuminate\Support\Collection;
|
||||
class ShowController extends Controller
|
||||
{
|
||||
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* ShowController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -68,6 +68,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show transactions without a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
@ -99,6 +101,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows ALL transactions without a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param JournalRepositoryInterface $repository
|
||||
*
|
||||
@ -128,6 +132,8 @@ class ShowController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Show a single budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
@ -156,6 +162,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a single budget by a budget limit.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
@ -195,6 +203,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all budget limits for a budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -229,6 +239,8 @@ class ShowController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Gets period overview used for budgets.
|
||||
*
|
||||
* @return Collection
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
|
@ -45,7 +45,7 @@ class NoCategoryController extends Controller
|
||||
|
||||
/** @var JournalRepositoryInterface Journals and transactions overview */
|
||||
private $journalRepos;
|
||||
/** @var CategoryRepositoryInterface */
|
||||
/** @var CategoryRepositoryInterface The category repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@ -68,6 +68,8 @@ class NoCategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show transactions without a category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string|null $moment
|
||||
*
|
||||
|
@ -51,7 +51,7 @@ class ShowController extends Controller
|
||||
private $accountRepos;
|
||||
/** @var JournalRepositoryInterface Journals and transactions overview */
|
||||
private $journalRepos;
|
||||
/** @var CategoryRepositoryInterface */
|
||||
/** @var CategoryRepositoryInterface The category repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@ -77,6 +77,8 @@ class ShowController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Show a single category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Category $category
|
||||
* @param Carbon|null $start
|
||||
@ -114,6 +116,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all transactions within a category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Category $category
|
||||
*
|
||||
@ -150,6 +154,8 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a period overview for category.
|
||||
*
|
||||
* @param Category $category
|
||||
*
|
||||
* @param Carbon $date
|
||||
|
@ -34,7 +34,7 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
/** @var CategoryRepositoryInterface */
|
||||
/** @var CategoryRepositoryInterface The category repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
|
@ -52,11 +52,11 @@ class AccountController extends Controller
|
||||
{
|
||||
use DateCalculation;
|
||||
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* AccountController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -109,6 +109,8 @@ class AccountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Expenses per budget, as shown on account overview.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -152,6 +154,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses per budget for all time, as shown on account overview.
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
* @param Account $account
|
||||
*
|
||||
@ -167,6 +171,8 @@ class AccountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Expenses per category for one single account.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -210,6 +216,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses grouped by category for account.
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
* @param Account $account
|
||||
*
|
||||
@ -253,6 +261,8 @@ class AccountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows all income per account for each category.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -296,6 +306,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the income grouped by category for an account, in all time.
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
* @param Account $account
|
||||
*
|
||||
@ -311,6 +323,8 @@ class AccountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows overview of account during a single period.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
*
|
||||
@ -427,6 +441,8 @@ class AccountController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows an overview of the account balances for a set of accounts.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -484,6 +500,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the budget names from a set of budget ID's.
|
||||
*
|
||||
* @param array $budgetIds
|
||||
*
|
||||
* @return array
|
||||
@ -506,7 +524,7 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function for some of the charts.
|
||||
* Get the category names from a set of category ID's. Small helper function for some of the charts.
|
||||
*
|
||||
* @param array $categoryIds
|
||||
*
|
||||
|
@ -38,11 +38,11 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class BillController extends Controller
|
||||
{
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
* checked.
|
||||
* BillController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -85,6 +85,8 @@ class BillController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows history for a single bill.
|
||||
*
|
||||
* @param JournalCollectorInterface $collector
|
||||
* @param Bill $bill
|
||||
*
|
||||
|
@ -50,10 +50,10 @@ use Illuminate\Support\Collection;
|
||||
class BudgetController extends Controller
|
||||
{
|
||||
use DateCalculation;
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
@ -75,6 +75,8 @@ class BudgetController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows overview of a single budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -123,7 +125,6 @@ class BudgetController extends Controller
|
||||
/**
|
||||
* Shows the amount left in a specific budget limit.
|
||||
*
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
@ -169,6 +170,8 @@ class BudgetController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows how much is spent per asset account.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
@ -217,6 +220,8 @@ class BudgetController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows how much is spent per category.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
@ -266,6 +271,8 @@ class BudgetController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows how much is spent per expense account.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
@ -370,6 +377,7 @@ class BudgetController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Shows a budget overview chart (spent and budgeted).
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
@ -415,6 +423,8 @@ class BudgetController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows a chart for transactions without a budget.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -451,6 +461,8 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the account names belonging to a bunch of account ID's.
|
||||
*
|
||||
* @param array $accountIds
|
||||
*
|
||||
* @return array
|
||||
@ -473,6 +485,8 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount of money budgeted in a period.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -501,7 +515,9 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function for some of the charts.
|
||||
* Small helper function for some of the charts. Extracts category names from a bunch of ID's.
|
||||
*
|
||||
* TODO this method is duplicated and should be in a trait.
|
||||
*
|
||||
* @param array $categoryIds
|
||||
*
|
||||
@ -526,6 +542,7 @@ class BudgetController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Get the expenses for a budget in a date range.
|
||||
*
|
||||
* @param Collection $limits
|
||||
* @param Budget $budget
|
||||
|
@ -48,13 +48,13 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class BudgetReportController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgetRepository;
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
private $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* BudgetReportController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -71,6 +71,8 @@ class BudgetReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart that groups expenses by the account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $budgets
|
||||
* @param Carbon $start
|
||||
@ -98,6 +100,8 @@ class BudgetReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart that groups the expenses by budget.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $budgets
|
||||
* @param Carbon $start
|
||||
@ -125,6 +129,8 @@ class BudgetReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Main overview of a budget in the budget report.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $budgets
|
||||
* @param Carbon $start
|
||||
@ -242,6 +248,8 @@ class BudgetReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Helper function that collects expenses for the given budgets.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $budgets
|
||||
* @param Carbon $start
|
||||
@ -264,6 +272,8 @@ class BudgetReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that groups expenses.
|
||||
*
|
||||
* @param Collection $set
|
||||
*
|
||||
* @return array
|
||||
|
@ -38,11 +38,11 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* CategoryController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -112,6 +112,8 @@ class CategoryController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Shows the category chart on the front page.
|
||||
*
|
||||
* @param CategoryRepositoryInterface $repository
|
||||
* @param AccountRepositoryInterface $accountRepository
|
||||
*
|
||||
@ -154,6 +156,8 @@ class CategoryController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart report.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
@ -215,6 +219,8 @@ class CategoryController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Chart for period for transactions without a category.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -272,6 +278,8 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Chart for a specific period.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param $date
|
||||
*
|
||||
@ -289,6 +297,8 @@ class CategoryController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Chart for a specific period (start and end).
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
|
@ -45,11 +45,11 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryReportController extends Controller
|
||||
{
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
private $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* CategoryReportController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -65,6 +65,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart for expenses grouped by expense account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -89,6 +91,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart for income grouped by revenue account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -116,6 +120,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Chart for expenses grouped by expense account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -143,6 +149,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Piechart for income grouped by account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -170,6 +178,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Main report category chart.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -281,6 +291,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Get all expenses in a period for categories.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -306,6 +318,8 @@ class CategoryReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Get all income for a period and a bunch of categories.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
@ -327,6 +341,8 @@ class CategoryReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Group transactions by category.
|
||||
*
|
||||
* @param Collection $set
|
||||
*
|
||||
* @return array
|
||||
|
@ -45,7 +45,7 @@ class ExpenseReportController extends Controller
|
||||
{
|
||||
/** @var AccountRepositoryInterface The account repository */
|
||||
protected $accountRepository;
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
@ -66,6 +66,8 @@ class ExpenseReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Main chart that shows income and expense for a combination of expense/revenue accounts.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $expense
|
||||
* @param Carbon $start
|
||||
@ -191,6 +193,8 @@ class ExpenseReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for the opposing account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return array
|
||||
@ -214,6 +218,8 @@ class ExpenseReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all expenses for a set of accounts.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $opposing
|
||||
* @param Carbon $start
|
||||
@ -231,6 +237,8 @@ class ExpenseReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the income for a set of accounts.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $opposing
|
||||
* @param Carbon $start
|
||||
@ -249,6 +257,8 @@ class ExpenseReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Group set of transactions by name of opposing account.
|
||||
*
|
||||
* @param Collection $set
|
||||
*
|
||||
* @return array
|
||||
|
@ -39,11 +39,11 @@ use Illuminate\Support\Collection;
|
||||
class PiggyBankController extends Controller
|
||||
{
|
||||
use DateCalculation;
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* PiggyBankController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -36,11 +36,11 @@ use Log;
|
||||
*/
|
||||
class ReportController extends Controller
|
||||
{
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* ReportController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -220,6 +220,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Sum up an array.
|
||||
*
|
||||
* @param $array
|
||||
*
|
||||
* @return string
|
||||
|
@ -44,11 +44,11 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class TagReportController extends Controller
|
||||
{
|
||||
/** @var GeneratorInterface */
|
||||
/** @var GeneratorInterface Chart generation methods. */
|
||||
protected $generator;
|
||||
|
||||
/**
|
||||
*
|
||||
* TagReportController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -59,6 +59,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Generate expenses for tags grouped on account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -86,6 +88,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Generate income for tag grouped by account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -113,6 +117,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Generate expense for tag grouped on budget.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -139,6 +145,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Generate expense for tag grouped on category.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -165,6 +173,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Generate main tag overview chart.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -276,6 +286,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Show expense grouped by expense account.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -303,6 +315,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Show income grouped by tag.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -330,6 +344,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Get all expenses by tags.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -355,6 +371,8 @@ class TagReportController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Get all income by tag.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $tags
|
||||
* @param Carbon $start
|
||||
@ -378,6 +396,8 @@ class TagReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Group transactions by tag.
|
||||
*
|
||||
* @param Collection $set
|
||||
*
|
||||
* @return array
|
||||
|
@ -32,19 +32,20 @@ use Illuminate\Http\Response as LaravelResponse;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class FileController.
|
||||
*
|
||||
* Class IndexController
|
||||
*/
|
||||
class IndexController extends Controller
|
||||
{
|
||||
/** @var array */
|
||||
public $providers;
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface The import job repository */
|
||||
public $repository;
|
||||
/** @var UserRepositoryInterface */
|
||||
public $userRepository;
|
||||
|
||||
/**
|
||||
*
|
||||
* IndexController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -37,11 +37,11 @@ use Log;
|
||||
*/
|
||||
class JobConfigurationController extends Controller
|
||||
{
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface The import job repository */
|
||||
public $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* JobConfigurationController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -162,6 +162,8 @@ class JobConfigurationController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a configurator object.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return JobConfigurationInterface
|
||||
|
@ -37,11 +37,11 @@ use Log;
|
||||
*/
|
||||
class JobStatusController extends Controller
|
||||
{
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface The import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* JobStatusController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -59,6 +59,8 @@ class JobStatusController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Index for job status.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -72,6 +74,8 @@ class JobStatusController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON overview of job status.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -120,6 +124,8 @@ class JobStatusController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls to start the job.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -214,6 +220,8 @@ class JobStatusController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the transactions.
|
||||
*
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @throws FireflyException
|
||||
|
@ -36,11 +36,11 @@ use Log;
|
||||
class PrerequisitesController extends Controller
|
||||
{
|
||||
|
||||
/** @var ImportJobRepositoryInterface */
|
||||
/** @var ImportJobRepositoryInterface The import job repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* PrerequisitesController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -66,6 +66,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List of all journals.
|
||||
*
|
||||
* @param JournalCollectorInterface $collector
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -97,6 +99,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List of budgets.
|
||||
*
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -125,6 +129,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List of currency names.
|
||||
*
|
||||
* @param CurrencyRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -165,6 +171,8 @@ class AutoCompleteController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* List of journals with their ID.
|
||||
*
|
||||
* @param JournalCollectorInterface $collector
|
||||
* @param TransactionJournal $except
|
||||
*
|
||||
@ -198,6 +206,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List of revenue accounts.
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -236,6 +246,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List of journals by type.
|
||||
*
|
||||
* @param JournalCollectorInterface $collector
|
||||
* @param string $what
|
||||
*
|
||||
@ -254,6 +266,8 @@ class AutoCompleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List if transaction types.
|
||||
*
|
||||
* @param JournalRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@ -44,6 +44,8 @@ class BoxController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* How much money user has available.
|
||||
*
|
||||
* @param BudgetRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -98,6 +100,8 @@ class BoxController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Current total balance.
|
||||
*
|
||||
* @param CurrencyRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -183,6 +187,8 @@ class BoxController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Bills to pay and paid.
|
||||
*
|
||||
* @param BillRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -219,6 +225,8 @@ class BoxController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Total user net worth.
|
||||
*
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -282,6 +290,8 @@ class BoxController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a currency or return default currency.
|
||||
*
|
||||
* @param Account $account
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
@ -307,6 +317,8 @@ class BoxController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if date is outside session range.
|
||||
*
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return bool
|
||||
|
@ -39,6 +39,8 @@ class ExchangeController extends Controller
|
||||
{
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Returns an exchange rate.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param TransactionCurrency $fromCurrency
|
||||
* @param TransactionCurrency $toCurrency
|
||||
|
@ -33,10 +33,12 @@ use Illuminate\Http\JsonResponse;
|
||||
class FrontpageController extends Controller
|
||||
{
|
||||
/**
|
||||
* Piggy bank pie chart.
|
||||
*
|
||||
* @param PiggyBankRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function piggyBanks(PiggyBankRepositoryInterface $repository): JsonResponse
|
||||
{
|
||||
|
@ -31,6 +31,8 @@ use Log;
|
||||
class IntroController
|
||||
{
|
||||
/**
|
||||
* Returns the introduction wizard for a page.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string|null $specificPage
|
||||
*
|
||||
@ -66,6 +68,8 @@ class IntroController
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if there is a general outro step.
|
||||
*
|
||||
* @param string $route
|
||||
*
|
||||
* @return bool
|
||||
@ -89,6 +93,8 @@ class IntroController
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the boxes for a specific page again.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string|null $specialPage
|
||||
*
|
||||
@ -109,6 +115,8 @@ class IntroController
|
||||
}
|
||||
|
||||
/**
|
||||
* Set that you saw them.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string|null $specialPage
|
||||
*
|
||||
@ -128,6 +136,8 @@ class IntroController
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the basic steps from config.
|
||||
*
|
||||
* @param string $route
|
||||
*
|
||||
* @return array
|
||||
@ -154,6 +164,8 @@ class IntroController
|
||||
}
|
||||
|
||||
/**
|
||||
* Get specific info for special routes.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $specificPage
|
||||
*
|
||||
|
@ -34,7 +34,6 @@ use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Update\CurrencyUpdateService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
@ -48,15 +47,15 @@ use Illuminate\Support\Collection;
|
||||
class ReconcileController extends Controller
|
||||
{
|
||||
|
||||
/** @var CurrencyUpdateService */
|
||||
private $accountRepos;
|
||||
/** @var AccountRepositoryInterface The account repository */
|
||||
private $accountRepos;
|
||||
/** @var CurrencyRepositoryInterface The currency repository */
|
||||
private $currencyRepos;
|
||||
/** @var JournalRepositoryInterface Journals and transactions overview */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* ReconcileController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -78,6 +77,8 @@ class ReconcileController extends Controller
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
/**
|
||||
* Overview of reconciliation.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
@ -86,10 +87,10 @@ class ReconcileController extends Controller
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function overview(Request $request, Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@ -138,6 +139,8 @@ class ReconcileController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of transactions in a modal.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@ -145,7 +148,7 @@ class ReconcileController extends Controller
|
||||
* @return mixed
|
||||
*
|
||||
* @throws FireflyException
|
||||
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function transactions(Account $account, Carbon $start, Carbon $end)
|
||||
{
|
||||
@ -185,6 +188,8 @@ class ReconcileController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect to actual account.
|
||||
*
|
||||
* @param Account $account
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
|
@ -37,11 +37,11 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class RecurrenceController extends Controller
|
||||
{
|
||||
/** @var RecurringRepositoryInterface */
|
||||
/** @var RecurringRepositoryInterface The recurring repository. */
|
||||
private $recurring;
|
||||
|
||||
/**
|
||||
*
|
||||
* RecurrenceController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -58,6 +58,8 @@ class RecurrenceController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows all events for a repetition. Used in calendar.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @throws FireflyException
|
||||
@ -139,6 +141,8 @@ class RecurrenceController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Suggests repetition moments.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@ -46,15 +46,15 @@ class ReportController extends Controller
|
||||
{
|
||||
/** @var AccountRepositoryInterface The account repository */
|
||||
private $accountRepository;
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgetRepository;
|
||||
/** @var CategoryRepositoryInterface */
|
||||
/** @var CategoryRepositoryInterface The category repository */
|
||||
private $categoryRepository;
|
||||
/** @var PopupReportInterface */
|
||||
/** @var PopupReportInterface Various helper functions. */
|
||||
private $popupHelper;
|
||||
|
||||
/**
|
||||
*
|
||||
* ReportController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -79,6 +79,7 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate popup view.
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -117,6 +118,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* View for balance row.
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return string
|
||||
@ -155,6 +158,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* View for spent in a single budget.
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return string
|
||||
@ -177,6 +182,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* View for transactions in a category.
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return string
|
||||
@ -253,6 +260,8 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses attributes from URI.
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return array
|
||||
|
@ -38,13 +38,13 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class CreateController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgets;
|
||||
/** @var RecurringRepositoryInterface */
|
||||
/** @var RecurringRepositoryInterface Recurring repository */
|
||||
private $recurring;
|
||||
|
||||
/**
|
||||
*
|
||||
* CreateController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -66,6 +66,8 @@ class CreateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new recurring transaction.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -113,6 +115,8 @@ class CreateController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a recurring transaction.
|
||||
*
|
||||
* @param RecurrenceFormRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
|
@ -34,11 +34,11 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class DeleteController extends Controller
|
||||
{
|
||||
/** @var RecurringRepositoryInterface */
|
||||
/** @var RecurringRepositoryInterface Recurring repository */
|
||||
private $recurring;
|
||||
|
||||
/**
|
||||
*
|
||||
* DeleteController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -58,6 +58,8 @@ class DeleteController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a recurring transaction form.
|
||||
*
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
@ -68,13 +70,14 @@ class DeleteController extends Controller
|
||||
// put previous url in session
|
||||
$this->rememberPreviousUri('recurrences.delete.uri');
|
||||
|
||||
// todo actual number.
|
||||
$journalsCreated = $this->recurring->getTransactions($recurrence)->count();
|
||||
|
||||
return view('recurring.delete', compact('recurrence', 'subTitle', 'journalsCreated'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the recurring transaction.
|
||||
*
|
||||
* @param RecurringRepositoryInterface $repository
|
||||
* @param Request $request
|
||||
* @param Recurrence $recurrence
|
||||
|
@ -40,13 +40,13 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
*/
|
||||
class EditController extends Controller
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgets;
|
||||
/** @var RecurringRepositoryInterface */
|
||||
/** @var RecurringRepositoryInterface Recurring repository */
|
||||
private $recurring;
|
||||
|
||||
/**
|
||||
*
|
||||
* EditController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -68,6 +68,8 @@ class EditController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a recurring transaction.
|
||||
*
|
||||
* todo move to repository
|
||||
* todo handle old repetition type as well.
|
||||
*
|
||||
@ -133,6 +135,8 @@ class EditController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the recurring transaction.
|
||||
*
|
||||
* @param RecurrenceFormRequest $request
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
|
@ -39,11 +39,11 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
*/
|
||||
class IndexController extends Controller
|
||||
{
|
||||
/** @var RecurringRepositoryInterface */
|
||||
/** @var RecurringRepositoryInterface Recurring repository */
|
||||
private $recurring;
|
||||
|
||||
/**
|
||||
*
|
||||
* IndexController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -63,6 +63,8 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all recurring transactions.
|
||||
*
|
||||
* TODO: split collection into pages
|
||||
*
|
||||
* @param Request $request
|
||||
@ -93,6 +95,8 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a single recurring transaction.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ class ReportController extends Controller
|
||||
/** @var ReportHelperInterface */
|
||||
protected $helper;
|
||||
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ class SingleController extends Controller
|
||||
{
|
||||
/** @var AttachmentHelperInterface */
|
||||
private $attachments;
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgets;
|
||||
/** @var JournalRepositoryInterface Journals and transactions overview */
|
||||
private $repository;
|
||||
|
@ -49,7 +49,7 @@ class SplitController extends Controller
|
||||
/** @var AttachmentHelperInterface */
|
||||
private $attachments;
|
||||
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $budgets;
|
||||
|
||||
/** @var CurrencyRepositoryInterface The currency repository */
|
||||
|
Loading…
Reference in New Issue
Block a user