Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Expand tests, do code cleanup.
James Cole78335e5814c6
diff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.phpindex 5c4633c340..e9f84419f3 100644--- a/app/Console/Commands/UpgradeDatabase.php+++ b/app/Console/Commands/UpgradeDatabase.php@@ -26,7 +26,7 @@ use DB;use FireflyIII\Models\Account;use FireflyIII\Models\AccountMeta;use FireflyIII\Models\AccountType;-use FireflyIII\Models\BudgetLimit;+use FireflyIII\Models\LimitRepetition;use FireflyIII\Models\Note;use FireflyIII\Models\Transaction;@@ -75,6 +75,8 @@ class UpgradeDatabase extends Command/*** Execute the console command.+ *+ * @throws \Exception*/public function handle(){@@ -282,6 +284,8 @@ class UpgradeDatabase extends Command/*** Move all the journal_meta notes to their note object counter parts.+ *+ * @throws \Exception*/private function migrateNotes(): void{diff --git a/app/Events/AdminRequestedTestMessage.php b/app/Events/AdminRequestedTestMessage.phpindex 5406ca4bc9..5950a77aa3 100644--- a/app/Events/AdminRequestedTestMessage.php+++ b/app/Events/AdminRequestedTestMessage.php@@ -33,7 +33,13 @@ class AdminRequestedTestMessage extends Event{use SerializesModels;+ /**+ * @var string+ */public $ipAddress;+ /**+ * @var User+ */public $user;/**diff --git a/app/Events/RegisteredUser.php b/app/Events/RegisteredUser.phpindex 3886edd432..f12ad7ee0a 100644--- a/app/Events/RegisteredUser.php+++ b/app/Events/RegisteredUser.php@@ -32,7 +32,13 @@ class RegisteredUser extends Event{use SerializesModels;+ /**+ * @var string+ */public $ipAddress;+ /**+ * @var User+ */public $user;/**diff --git a/app/Events/RequestedNewPassword.php b/app/Events/RequestedNewPassword.phpindex e8031e316e..660445f3a8 100644--- a/app/Events/RequestedNewPassword.php+++ b/app/Events/RequestedNewPassword.php@@ -32,8 +32,17 @@ class RequestedNewPassword extends Event{use SerializesModels;+ /**+ * @var string+ */public $ipAddress;+ /**+ * @var string+ */public $token;+ /**+ * @var User+ */public $user;/**diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.phpindex 788b5f8731..3964471d0d 100644--- a/app/Exceptions/Handler.php+++ b/app/Exceptions/Handler.php@@ -28,6 +28,9 @@ use FireflyIII\Jobs\MailError;use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;use Request;+/**+ * Class Handler+ */class Handler extends ExceptionHandler{/**@@ -78,6 +81,7 @@ class Handler extends ExceptionHandler* @param \Exception $exception** @return mixed|void+ * @throws Exception*/public function report(Exception $exception){diff --git a/app/Export/Entry/Entry.php b/app/Export/Entry/Entry.phpindex b9b73ac463..efe81d8def 100644--- a/app/Export/Entry/Entry.php+++ b/app/Export/Entry/Entry.php@@ -45,44 +45,131 @@ use FireflyIII\Models\Transaction;final class Entry{// @formatter:off+ /**+ * @var+ */public $journal_id;+ /**+ * @var int+ */public $transaction_id = 0;+ /**+ * @var+ */public $date;+ /**+ * @var+ */public $description;+ /**+ * @var+ */public $currency_code;+ /**+ * @var+ */public $amount;+ /**+ * @var string+ */public $foreign_currency_code = '';- public $foreign_amount = '0';+ /**+ * @var string+ */+ public $foreign_amount = '0';+ /**+ * @var+ */public $transaction_type;+ /**+ * @var+ */public $asset_account_id;+ /**+ * @var+ */public $asset_account_name;+ /**+ * @var+ */public $asset_account_iban;+ /**+ * @var+ */public $asset_account_bic;+ /**+ * @var+ */public $asset_account_number;+ /**+ * @var+ */public $asset_currency_code;+ /**+ * @var+ */public $opposing_account_id;+ /**+ * @var+ */public $opposing_account_name;+ /**+ * @var+ */public $opposing_account_iban;+ /**+ * @var+ */public $opposing_account_bic;+ /**+ * @var+ */public $opposing_account_number;+ /**+ * @var+ */public $opposing_currency_code;+ /**+ * @var+ */public $budget_id;+ /**+ * @var+ */public $budget_name;+ /**+ * @var+ */public $category_id;+ /**+ * @var+ */public $category_name;+ /**+ * @var+ */public $bill_id;+ /**+ * @var+ */public $bill_name;+ /**+ * @var+ */public $notes;+ /**+ * @var+ */public $tags;diff --git a/app/Export/ExpandedProcessor.php b/app/Export/ExpandedProcessor.phpindex 11504e2267..6bf8343036 100644--- a/app/Export/ExpandedProcessor.php+++ b/app/Export/ExpandedProcessor.php@@ -173,6 +173,7 @@ class ExpandedProcessor implements ProcessorInterface* @return bool** @throws FireflyException+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function createZipFile(): bool{diff --git a/app/Export/Exporter/CsvExporter.php b/app/Export/Exporter/CsvExporter.phpindex 2799f7902f..06481e7f32 100644--- a/app/Export/Exporter/CsvExporter.php+++ b/app/Export/Exporter/CsvExporter.php@@ -52,6 +52,7 @@ class CsvExporter extends BasicExporter implements ExporterInterface/*** @return bool+ * @throws \TypeError*/public function run(): bool{diff --git a/app/Generator/Report/Standard/MonthReportGenerator.php b/app/Generator/Report/Standard/MonthReportGenerator.phpindex 6e41f462e8..577b659fcf 100644--- a/app/Generator/Report/Standard/MonthReportGenerator.php+++ b/app/Generator/Report/Standard/MonthReportGenerator.php@@ -41,6 +41,7 @@ class MonthReportGenerator implements ReportGeneratorInterface/*** @return string+ * @throws \Throwable*/public function generate(): string{diff --git a/app/Generator/Report/Standard/MultiYearReportGenerator.php b/app/Generator/Report/Standard/MultiYearReportGenerator.phpindex 8910fe2fe0..b7b2bc8d63 100644--- a/app/Generator/Report/Standard/MultiYearReportGenerator.php+++ b/app/Generator/Report/Standard/MultiYearReportGenerator.php@@ -40,6 +40,7 @@ class MultiYearReportGenerator implements ReportGeneratorInterface/*** @return string+ * @throws \Throwable*/public function generate(): string{diff --git a/app/Generator/Report/Standard/YearReportGenerator.php b/app/Generator/Report/Standard/YearReportGenerator.phpindex 06bced562e..8119625d31 100644--- a/app/Generator/Report/Standard/YearReportGenerator.php+++ b/app/Generator/Report/Standard/YearReportGenerator.php@@ -40,6 +40,7 @@ class YearReportGenerator implements ReportGeneratorInterface/*** @return string+ * @throws \Throwable*/public function generate(): string{diff --git a/app/Helpers/Collection/BalanceLine.php b/app/Helpers/Collection/BalanceLine.phpindex 2f8f8f729f..1dd425cde6 100644--- a/app/Helpers/Collection/BalanceLine.php+++ b/app/Helpers/Collection/BalanceLine.php@@ -32,9 +32,18 @@ use Illuminate\Support\Collection;*/class BalanceLine{+ /**+ *+ */const ROLE_DEFAULTROLE = 1;- const ROLE_TAGROLE = 2;- const ROLE_DIFFROLE = 3;+ /**+ *+ */+ const ROLE_TAGROLE = 2;+ /**+ *+ */+ const ROLE_DIFFROLE = 3;/** @var Collection */protected $balanceEntries;diff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.phpindex e23991e18c..096142da94 100644--- a/app/Helpers/Collector/JournalCollectorInterface.php+++ b/app/Helpers/Collector/JournalCollectorInterface.php@@ -203,6 +203,11 @@ interface JournalCollectorInterface*/public function setTypes(array $types): JournalCollectorInterface;+ /**+ * @param User $user+ *+ * @return mixed+ */public function setUser(User $user);/**diff --git a/app/Helpers/Filter/AmountFilter.php b/app/Helpers/Filter/AmountFilter.phpindex 970bbefa49..faee5a69b3 100644--- a/app/Helpers/Filter/AmountFilter.php+++ b/app/Helpers/Filter/AmountFilter.php@@ -37,6 +37,11 @@ class AmountFilter implements FilterInterface/** @var int */private $modifier = 0;+ /**+ * AmountFilter constructor.+ *+ * @param int $modifier+ */public function __construct(int $modifier){$this->modifier = $modifier;diff --git a/app/Helpers/Filter/FilterInterface.php b/app/Helpers/Filter/FilterInterface.phpindex 229864ad8f..3c932886cc 100644--- a/app/Helpers/Filter/FilterInterface.php+++ b/app/Helpers/Filter/FilterInterface.php@@ -24,6 +24,11 @@ namespace FireflyIII\Helpers\Filter;use Illuminate\Support\Collection;+/**+ * Interface FilterInterface+ *+ * @package FireflyIII\Helpers\Filter+ */interface FilterInterface{/**diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.phpindex 265a642d5e..019d2ef058 100644--- a/app/Helpers/Help/Help.php+++ b/app/Helpers/Help/Help.php@@ -34,6 +34,9 @@ use Route;*/class Help implements HelpInterface{+ /**+ *+ */const CACHEKEY = 'help_%s_%s';/** @var string */protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36';diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.phpindex 5a01279c2c..cd6777024e 100644--- a/app/Http/Controllers/Account/ReconcileController.php+++ b/app/Http/Controllers/Account/ReconcileController.php@@ -111,6 +111,7 @@ class ReconcileController extends Controller* @return \Illuminate\Http\JsonResponse** @throws FireflyException+ * @throws \Throwable*/public function overview(Request $request, Account $account, Carbon $start, Carbon $end){@@ -165,6 +166,7 @@ class ReconcileController extends Controller* @param Carbon|null $end** @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View+ * @throws FireflyException*/public function reconcile(Account $account, Carbon $start = null, Carbon $end = null){@@ -294,6 +296,8 @@ class ReconcileController extends Controller* @param Carbon $end** @return mixed+ * @throws \Throwable+ * @throws FireflyException*/public function transactions(Account $account, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.phpindex 7f477cb649..47fffea19a 100644--- a/app/Http/Controllers/AccountController.php+++ b/app/Http/Controllers/AccountController.php@@ -151,6 +151,9 @@ class AccountController extends Controller* @SuppressWarnings(PHPMD.ExcessiveMethodLength)** @return View+ * @throws FireflyException+ * @throws FireflyException+ * @throws FireflyException*/public function edit(Request $request, Account $account){@@ -258,6 +261,7 @@ class AccountController extends Controller** @SuppressWarnings(PHPMD.CyclomaticComplexity) // long and complex but not that excessively so.* @SuppressWarnings(PHPMD.ExcessiveMethodLength)+ * @throws FireflyException*/public function show(Request $request, JournalRepositoryInterface $repository, Account $account, string $moment = ''){diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.phpindex 38b14bae8d..aaf73c7a9e 100644--- a/app/Http/Controllers/Admin/LinkController.php+++ b/app/Http/Controllers/Admin/LinkController.php@@ -206,6 +206,13 @@ class LinkController extends Controllerreturn redirect($this->getPreviousUri('link_types.create.uri'));}+ /**+ * @param LinkTypeFormRequest $request+ * @param LinkTypeRepositoryInterface $repository+ * @param LinkType $linkType+ *+ * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector+ */public function update(LinkTypeFormRequest $request, LinkTypeRepositoryInterface $repository, LinkType $linkType){if (!$linkType->editable) {diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.phpindex 4261310574..4c3c121334 100644--- a/app/Http/Controllers/AttachmentController.php+++ b/app/Http/Controllers/AttachmentController.php@@ -149,6 +149,7 @@ class AttachmentController extends Controller* @param Attachment $attachment** @return \Illuminate\Http\Response+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function preview(Attachment $attachment){diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.phpindex 9a475eefd3..dbe7685aad 100644--- a/app/Http/Controllers/Auth/ForgotPasswordController.php+++ b/app/Http/Controllers/Auth/ForgotPasswordController.php@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Controllers\Auth;use FireflyIII\Http\Controllers\Controller;use Illuminate\Foundation\Auth\SendsPasswordResetEmails;+/**+ * Class ForgotPasswordController+ */class ForgotPasswordController extends Controller{/*diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.phpindex d6f961f685..601fae5c11 100644--- a/app/Http/Controllers/Auth/RegisterController.php+++ b/app/Http/Controllers/Auth/RegisterController.php@@ -31,6 +31,9 @@ use Illuminate\Http\Request;use Illuminate\Support\Facades\Validator;use Session;+/**+ * Class RegisterController+ */class RegisterController extends Controller{/*diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.phpindex db288d8d3f..aa520acb33 100644--- a/app/Http/Controllers/Auth/ResetPasswordController.php+++ b/app/Http/Controllers/Auth/ResetPasswordController.php@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Controllers\Auth;use FireflyIII\Http\Controllers\Controller;use Illuminate\Foundation\Auth\ResetsPasswords;+/**+ * Class ResetPasswordController+ */class ResetPasswordController extends Controller{/*diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.phpindex a4cd2711de..00dcef0b02 100644--- a/app/Http/Controllers/Auth/TwoFactorController.php+++ b/app/Http/Controllers/Auth/TwoFactorController.php@@ -70,7 +70,6 @@ class TwoFactorController extends Controller/*** @return mixed*- * @throws FireflyException*/public function lostTwoFactor(){diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.phpindex a0dc043ae7..9ad67ebbea 100644--- a/app/Http/Controllers/BudgetController.php+++ b/app/Http/Controllers/BudgetController.php@@ -73,8 +73,9 @@ class BudgetController extends Controller}/**- * @param Request $request- * @param Budget $budget+ * @param Request $request+ * @param BudgetRepositoryInterface $repository+ * @param Budget $budget** @return \Illuminate\Http\JsonResponse*/diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex 071fe37649..c01d888ce4 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -342,7 +342,6 @@ class AccountController extends Controller** @return \Illuminate\Http\JsonResponse*- * @throws FireflyException*/public function period(Account $account, Carbon $start){diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.phpindex 6528d7511b..7a2ceecdd6 100644--- a/app/Http/Controllers/Chart/TagReportController.php+++ b/app/Http/Controllers/Chart/TagReportController.php@@ -38,6 +38,9 @@ use FireflyIII\Support\CacheProperties;use Illuminate\Support\Collection;use Response;+/**+ * Class TagReportController+ */class TagReportController extends Controller{/** @var GeneratorInterface */diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.phpindex 3f0427b753..346eabfff4 100644--- a/app/Http/Controllers/HomeController.php+++ b/app/Http/Controllers/HomeController.php@@ -273,6 +273,8 @@ class HomeController extends Controller}/**+ * @param Request $request+ ** @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector*/public function testFlash(Request $request)diff --git a/app/Http/Controllers/Import/BankController.php b/app/Http/Controllers/Import/BankController.phpindex c911ffc2e8..5eaf4eb436 100644--- a/app/Http/Controllers/Import/BankController.php+++ b/app/Http/Controllers/Import/BankController.php@@ -27,6 +27,9 @@ use FireflyIII\Http\Controllers\Controller;use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;use FireflyIII\Support\Import\Prerequisites\PrerequisitesInterface;+/**+ * Class BankController+ */class BankController extends Controller{diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.phpindex 22e8fb754e..03d3d73931 100644--- a/app/Http/Controllers/JavascriptController.php+++ b/app/Http/Controllers/JavascriptController.php@@ -87,7 +87,10 @@ class JavascriptController extends Controller}/**- * @param Request $request+ * @param Request $request+ *+ * @param AccountRepositoryInterface $repository+ * @param CurrencyRepositoryInterface $currencyRepository** @return \Illuminate\Http\Response*/diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.phpindex c0390c6ffd..5bbcfa66ca 100644--- a/app/Http/Controllers/Json/FrontpageController.php+++ b/app/Http/Controllers/Json/FrontpageController.php@@ -36,6 +36,7 @@ class FrontpageController extends Controller* @param PiggyBankRepositoryInterface $repository** @return \Illuminate\Http\JsonResponse+ * @throws \Throwable*/public function piggyBanks(PiggyBankRepositoryInterface $repository){diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.phpindex a9239d71c1..f88a01b154 100644--- a/app/Http/Controllers/JsonController.php+++ b/app/Http/Controllers/JsonController.php@@ -46,6 +46,7 @@ class JsonController extends Controller* @param Request $request** @return \Illuminate\Http\JsonResponse+ * @throws \Throwable*/public function action(Request $request){@@ -120,6 +121,7 @@ class JsonController extends Controller* @param Request $request** @return \Illuminate\Http\JsonResponse+ * @throws \Throwable*/public function trigger(Request $request){diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.phpindex 1b08f49932..22dcf29801 100644--- a/app/Http/Controllers/Popup/ReportController.php+++ b/app/Http/Controllers/Popup/ReportController.php@@ -81,6 +81,11 @@ class ReportController extends Controller* @return \Illuminate\Http\JsonResponse** @throws FireflyException+ * @throws \Throwable+ * @throws \Throwable+ * @throws \Throwable+ * @throws \Throwable+ * @throws \Throwable*/public function general(Request $request){@@ -119,6 +124,7 @@ class ReportController extends Controller* @return string** @throws FireflyException+ * @throws \Throwable*/private function balanceAmount(array $attributes): string{@@ -156,7 +162,7 @@ class ReportController extends Controller** @return string*- * @throws FireflyException+ * @throws \Throwable*/private function budgetSpentAmount(array $attributes): string{@@ -170,11 +176,11 @@ class ReportController extends Controller/*** Returns all expenses in category in range.*- * @param $attributes+ * @param array $attributes** @return string*- * @throws FireflyException+ * @throws \Throwable*/private function categoryEntry(array $attributes): string{@@ -188,11 +194,11 @@ class ReportController extends Controller/*** Returns all the expenses that went to the given expense account.*- * @param $attributes+ * @param array $attributes** @return string*- * @throws FireflyException+ * @throws \Throwable*/private function expenseEntry(array $attributes): string{@@ -206,11 +212,11 @@ class ReportController extends Controller/*** Returns all the incomes that went to the given asset account.*- * @param $attributes+ * @param array $attributes** @return string*- * @throws FireflyException+ * @throws \Throwable*/private function incomeEntry(array $attributes): string{diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.phpindex 2f19ed02ab..5baebdfa79 100644--- a/app/Http/Controllers/PreferencesController.php+++ b/app/Http/Controllers/PreferencesController.php@@ -71,6 +71,8 @@ class PreferencesController extends Controller/*** @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector+ * @throws \Exception+ * @throws \Exception*/public function deleteCode(){diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex bf487e897c..376443dbab 100644--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -259,8 +259,9 @@ class ProfileController extends Controller}/**- * @param string $token- * @param string $hash+ * @param UserRepositoryInterface $repository+ * @param string $token+ * @param string $hash** @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector*diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.phpindex 56215699f4..589cf3d234 100644--- a/app/Http/Controllers/Report/AccountController.php+++ b/app/Http/Controllers/Report/AccountController.php@@ -39,6 +39,7 @@ class AccountController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function general(Collection $accounts, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.phpindex af4a0a629d..94ac4f280f 100644--- a/app/Http/Controllers/Report/BalanceController.php+++ b/app/Http/Controllers/Report/BalanceController.php@@ -40,6 +40,7 @@ class BalanceController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function general(BalanceReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.phpindex e1b62ba45a..8891be09d6 100644--- a/app/Http/Controllers/Report/BudgetController.php+++ b/app/Http/Controllers/Report/BudgetController.php@@ -41,6 +41,7 @@ class BudgetController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end){@@ -68,6 +69,7 @@ class BudgetController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function period(Collection $accounts, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.phpindex 5cf4507a21..25f9d5fe9d 100644--- a/app/Http/Controllers/Report/CategoryController.php+++ b/app/Http/Controllers/Report/CategoryController.php@@ -40,6 +40,7 @@ class CategoryController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function expenses(Collection $accounts, Carbon $start, Carbon $end){@@ -71,6 +72,7 @@ class CategoryController extends Controller* @param Collection $accounts** @return string+ * @throws \Throwable*/public function income(Collection $accounts, Carbon $start, Carbon $end){@@ -104,6 +106,7 @@ class CategoryController extends Controller* @return mixed|string** @internal param ReportHelperInterface $helper+ * @throws \Throwable*/public function operations(Collection $accounts, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/Report/ExpenseController.php b/app/Http/Controllers/Report/ExpenseController.phpindex 2f39d2330f..a9c722ea66 100644--- a/app/Http/Controllers/Report/ExpenseController.php+++ b/app/Http/Controllers/Report/ExpenseController.php@@ -211,6 +211,15 @@ class ExpenseController extends Controller}+ /**+ * @param Collection $accounts+ * @param Collection $expense+ * @param Carbon $start+ * @param Carbon $end+ *+ * @return string+ * @throws \Throwable+ */public function topExpense(Collection $accounts, Collection $expense, Carbon $start, Carbon $end){// Properties for cache:@@ -246,6 +255,15 @@ class ExpenseController extends Controller}+ /**+ * @param Collection $accounts+ * @param Collection $expense+ * @param Carbon $start+ * @param Carbon $end+ *+ * @return mixed|string+ * @throws \Throwable+ */public function topIncome(Collection $accounts, Collection $expense, Carbon $start, Carbon $end){// Properties for cache:@@ -366,6 +384,14 @@ class ExpenseController extends Controllerreturn $sum;}+ /**+ * @param Collection $assets+ * @param Collection $opposing+ * @param Carbon $start+ * @param Carbon $end+ *+ * @return array+ */protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array{/** @var JournalCollectorInterface $collector */diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.phpindex 860734891a..29fcee0693 100644--- a/app/Http/Controllers/Report/OperationsController.php+++ b/app/Http/Controllers/Report/OperationsController.php@@ -40,6 +40,7 @@ class OperationsController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function expenses(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end){@@ -67,6 +68,7 @@ class OperationsController extends Controller* @param Carbon $end** @return string+ * @throws \Throwable*/public function income(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end){@@ -95,6 +97,7 @@ class OperationsController extends Controller* @param Carbon $end** @return mixed|string+ * @throws \Throwable*/public function operations(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end){diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.phpindex 9a29dae03b..e52201b56c 100644--- a/app/Http/Controllers/RuleController.php+++ b/app/Http/Controllers/RuleController.php@@ -72,6 +72,8 @@ class RuleController extends Controller* @param RuleGroup $ruleGroup** @return View+ * @throws \Throwable+ * @throws \Throwable*/public function create(Request $request, RuleGroup $ruleGroup){@@ -164,6 +166,10 @@ class RuleController extends Controller* @param Rule $rule** @return View+ * @throws \Throwable+ * @throws \Throwable+ * @throws \Throwable+ * @throws \Throwable*/public function edit(Request $request, RuleRepositoryInterface $repository, Rule $rule){@@ -356,6 +362,7 @@ class RuleController extends Controller* @param TestRuleFormRequest $request** @return \Illuminate\Http\JsonResponse+ * @throws \Throwable*/public function testTriggers(TestRuleFormRequest $request){@@ -528,6 +535,7 @@ class RuleController extends Controller* @param Rule $rule** @return array+ * @throws \Throwable*/private function getCurrentActions(Rule $rule){@@ -556,6 +564,7 @@ class RuleController extends Controller* @param Rule $rule** @return array+ * @throws \Throwable*/private function getCurrentTriggers(Rule $rule){@@ -586,6 +595,7 @@ class RuleController extends Controller* @param Request $request** @return array+ * @throws \Throwable*/private function getPreviousActions(Request $request){@@ -615,6 +625,7 @@ class RuleController extends Controller* @param Request $request** @return array+ * @throws \Throwable*/private function getPreviousTriggers(Request $request){diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.phpindex c6e1ace145..cf77efaf76 100644--- a/app/Http/Controllers/SearchController.php+++ b/app/Http/Controllers/SearchController.php@@ -69,6 +69,13 @@ class SearchController extends Controllerreturn view('search.index', compact('query', 'fullQuery', 'subTitle'));}+ /**+ * @param Request $request+ * @param SearchInterface $searcher+ *+ * @return \Illuminate\Http\JsonResponse+ * @throws \Throwable+ */public function search(Request $request, SearchInterface $searcher){$fullQuery = strval($request->get('query'));@@ -79,7 +86,7 @@ class SearchController extends Controller$cache->addProperty($fullQuery);if ($cache->has()) {- $transactions = $cache->get();+ $transactions = $cache->get(); // @codeCoverageIgnore}if (!$cache->has()) {diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.phpindex 28e7cee929..db2407d85e 100644--- a/app/Http/Controllers/TagController.php+++ b/app/Http/Controllers/TagController.php@@ -161,7 +161,7 @@ class TagController extends Controller$start = new Carbon;if (null !== $oldestTag) {/** @var Carbon $start */- $start = $oldestTag->date;+ $start = $oldestTag->date; // @codeCoverageIgnore}if (null === $oldestTag) {/** @var Carbon $start */diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.phpindex 393c4d1ce6..490d817aa3 100644--- a/app/Http/Controllers/Transaction/ConvertController.php+++ b/app/Http/Controllers/Transaction/ConvertController.php@@ -128,6 +128,8 @@ class ConvertController extends Controller* @param TransactionJournal $journal** @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector+ * @throws FireflyException+ * @throws FireflyException*/public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal){diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.phpindex 36d04b6dda..7a188d23c7 100644--- a/app/Http/Controllers/Transaction/SingleController.php+++ b/app/Http/Controllers/Transaction/SingleController.php@@ -97,6 +97,11 @@ class SingleController extends Controller);}+ /**+ * @param TransactionJournal $journal+ *+ * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector+ */public function cloneTransaction(TransactionJournal $journal){$source = $journal->sourceAccountList()->first();@@ -149,7 +154,8 @@ class SingleController extends Controller}/**- * @param string $what+ * @param Request $request+ * @param string $what** @return View*/diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.phpindex 37cb63abdf..02b222069d 100644--- a/app/Http/Controllers/TransactionController.php+++ b/app/Http/Controllers/TransactionController.php@@ -69,6 +69,7 @@ class TransactionController extends Controller* @param string $moment** @return View+ * @throws FireflyException*/public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = ''){@@ -128,6 +129,8 @@ class TransactionController extends Controller/*** @param Request $request* @param JournalRepositoryInterface $repository+ *+ * @return \Illuminate\Http\JsonResponse*/public function reconcile(Request $request, JournalRepositoryInterface $repository){@@ -139,6 +142,7 @@ class TransactionController extends Controller$repository->reconcile($transaction);}+ return Response::json(['ok'=>'reconciled']);}/**@@ -180,7 +184,7 @@ class TransactionController extends Controllerreturn $this->redirectToAccount($journal);}if ($journal->transactionType->type === TransactionType::RECONCILIATION) {- return redirect(route('accounts.reconcile.show', [$journal->id]));+ return redirect(route('accounts.reconcile.show', [$journal->id])); // @codeCoverageIgnore}$linkTypes = $linkTypeRepository->get();$links = $linkTypeRepository->getLinks($journal);@@ -197,7 +201,6 @@ class TransactionController extends Controller** @return Collection*- * @throws FireflyException*/private function getPeriodOverview(string $what): Collection{@@ -248,7 +251,7 @@ class TransactionController extends Controller];Log::debug(sprintf('What is %s', $what));if ($journals->count() > 0) {- $entries->push($array);+ $entries->push($array); // @codeCoverageIgnore}$end = app('navigation')->subtractPeriod($end, $range, 1);}diff --git a/app/Http/Kernel.php b/app/Http/Kernel.phpindex dc9ae702cc..0acba8c535 100644--- a/app/Http/Kernel.php+++ b/app/Http/Kernel.php@@ -46,6 +46,9 @@ use Illuminate\Routing\Middleware\SubstituteBindings;use Illuminate\Routing\Middleware\ThrottleRequests;use Illuminate\View\Middleware\ShareErrorsFromSession;+/**+ * Class Kernel+ */class Kernel extends HttpKernel{/**diff --git a/app/Http/Middleware/Binder.php b/app/Http/Middleware/Binder.phpindex 056fff3f9a..64553e8701 100644--- a/app/Http/Middleware/Binder.php+++ b/app/Http/Middleware/Binder.php@@ -31,6 +31,9 @@ use Illuminate\Http\Request;*/class Binder{+ /**+ * @var array+ */protected $binders = [];/**diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.phpindex c54f9920c4..8104153c01 100644--- a/app/Http/Middleware/EncryptCookies.php+++ b/app/Http/Middleware/EncryptCookies.php@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;+/**+ * Class EncryptCookies+ */class EncryptCookies extends Middleware{/**diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.phpindex 174fe612cb..5ebd0e50c9 100644--- a/app/Http/Middleware/RedirectIfAuthenticated.php+++ b/app/Http/Middleware/RedirectIfAuthenticated.php@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Middleware;use Closure;use Illuminate\Support\Facades\Auth;+/**+ * Class RedirectIfAuthenticated+ */class RedirectIfAuthenticated{/**diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.phpindex 5cf7ccd723..e3dfba1361 100644--- a/app/Http/Middleware/TrimStrings.php+++ b/app/Http/Middleware/TrimStrings.php@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;+/**+ * Class TrimStrings+ */class TrimStrings extends Middleware{/**diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.phpindex b66bca8c09..00aa91c146 100644--- a/app/Http/Middleware/TrustProxies.php+++ b/app/Http/Middleware/TrustProxies.php@@ -26,6 +26,9 @@ use Fideloper\Proxy\TrustProxies as Middleware;use Illuminate\Contracts\Config\Repository;use Illuminate\Http\Request;+/**+ * Class TrustProxies+ */class TrustProxies extends Middleware{/**diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.phpindex 82e05ffddd..3bb109f024 100644--- a/app/Http/Middleware/VerifyCsrfToken.php+++ b/app/Http/Middleware/VerifyCsrfToken.php@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;+/**+ * Class VerifyCsrfToken+ */class VerifyCsrfToken extends Middleware{/**diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.phpindex 56c2836e47..15f8018830 100644--- a/app/Http/Requests/JournalFormRequest.php+++ b/app/Http/Requests/JournalFormRequest.php@@ -84,6 +84,7 @@ class JournalFormRequest extends Request/*** @return array+ * @throws FireflyException*/public function rules(){diff --git a/app/Import/FileProcessor/CsvProcessor.php b/app/Import/FileProcessor/CsvProcessor.phpindex cdeb54805c..e7cb496d66 100644--- a/app/Import/FileProcessor/CsvProcessor.php+++ b/app/Import/FileProcessor/CsvProcessor.php@@ -70,6 +70,7 @@ class CsvProcessor implements FileProcessorInterface* Does the actual job.** @return bool+ * @throws \League\Csv\Exception*/public function run(): bool{@@ -159,6 +160,9 @@ class CsvProcessor implements FileProcessorInterface/*** @return Iterator+ * @throws \League\Csv\Exception+ * @throws \League\Csv\Exception+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/private function getImportArray(): Iterator{@@ -275,6 +279,7 @@ class CsvProcessor implements FileProcessorInterface* @param array $array** @return bool+ * @throws FireflyException*/private function rowAlreadyImported(array $array): bool{diff --git a/app/Import/Object/ImportCategory.php b/app/Import/Object/ImportCategory.phpindex fca23422ab..4dc0207885 100644--- a/app/Import/Object/ImportCategory.php+++ b/app/Import/Object/ImportCategory.php@@ -28,6 +28,9 @@ use FireflyIII\User;use Illuminate\Support\Collection;use Log;+/**+ * Class ImportCategory+ */class ImportCategory{/** @var Category */diff --git a/app/Import/Object/ImportCurrency.php b/app/Import/Object/ImportCurrency.phpindex d995d7a2bb..5cf6a57689 100644--- a/app/Import/Object/ImportCurrency.php+++ b/app/Import/Object/ImportCurrency.php@@ -27,6 +27,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;use FireflyIII\User;use Log;+/**+ * Class ImportCurrency+ */class ImportCurrency{/** @var array */diff --git a/app/Import/Prerequisites/BunqPrerequisites.php b/app/Import/Prerequisites/BunqPrerequisites.phpindex b2ec238eb4..d0c6b55b6a 100644--- a/app/Import/Prerequisites/BunqPrerequisites.php+++ b/app/Import/Prerequisites/BunqPrerequisites.php@@ -155,6 +155,7 @@ class BunqPrerequisites implements PrerequisitesInterface* @return DeviceServerId** @throws FireflyException+ * @throws \Exception*/private function getExistingDevice(): DeviceServerId{@@ -292,6 +293,10 @@ class BunqPrerequisites implements PrerequisitesInterface* - Use this token to send a device server request* - Store the installation token* - Use the installation token each time we need a session.+ *+ * @throws FireflyException+ * @throws FireflyException+ * @throws \Exception*/private function registerDevice(): DeviceServerId{diff --git a/app/Import/Prerequisites/PrerequisitesInterface.php b/app/Import/Prerequisites/PrerequisitesInterface.phpindex 0423f696e0..e7c20048dc 100644--- a/app/Import/Prerequisites/PrerequisitesInterface.php+++ b/app/Import/Prerequisites/PrerequisitesInterface.php@@ -26,6 +26,11 @@ use FireflyIII\User;use Illuminate\Http\Request;use Illuminate\Support\MessageBag;+/**+ * Interface PrerequisitesInterface+ *+ * @package FireflyIII\Import\Prerequisites+ */interface PrerequisitesInterface{/**diff --git a/app/Import/Routine/RoutineInterface.php b/app/Import/Routine/RoutineInterface.phpindex 241a8e01da..9e50d1b3cb 100644--- a/app/Import/Routine/RoutineInterface.php+++ b/app/Import/Routine/RoutineInterface.php@@ -25,6 +25,11 @@ namespace FireflyIII\Import\Routine;use FireflyIII\Models\ImportJob;use Illuminate\Support\Collection;+/**+ * Interface RoutineInterface+ *+ * @package FireflyIII\Import\Routine+ */interface RoutineInterface{/**diff --git a/app/Import/Storage/ImportSupport.php b/app/Import/Storage/ImportSupport.phpindex d5640aa98c..6bbd14488d 100644--- a/app/Import/Storage/ImportSupport.php+++ b/app/Import/Storage/ImportSupport.php@@ -408,6 +408,12 @@ trait ImportSupport}}+ /**+ * @param array $parameters+ *+ * @return TransactionJournal+ * @throws FireflyException+ */private function storeJournal(array $parameters): TransactionJournal{// find transaction type:diff --git a/app/Jobs/GetSpectreProviders.php b/app/Jobs/GetSpectreProviders.phpindex 0184d6ce4f..72fac255ae 100644--- a/app/Jobs/GetSpectreProviders.php+++ b/app/Jobs/GetSpectreProviders.php@@ -13,14 +13,22 @@ use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;use Log;+/**+ * Class GetSpectreProviders+ */class GetSpectreProviders implements ShouldQueue{use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;+ /**+ * @var User+ */protected $user;/*** Create a new job instance.+ *+ * @param User $user*/public function __construct(User $user){@@ -30,6 +38,9 @@ class GetSpectreProviders implements ShouldQueue/*** Execute the job.+ *+ * @throws \Illuminate\Container\EntryNotFoundException+ * @throws \Exception*/public function handle(){diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 50c6ec7618..4aef0b21fc 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -59,6 +59,9 @@ class Account extends Modelprotected $fillable = ['user_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];/** @var array */protected $hidden = ['encrypted'];+ /**+ * @var array+ */protected $rules= ['user_id' => 'required|exists:users,id',@@ -216,7 +219,6 @@ class Account extends Model** @return TransactionJournal*- * @throws FireflyException*/public function getOpeningBalance(): TransactionJournal{@@ -267,7 +269,6 @@ class Account extends Model** @return Carbon*- * @throws FireflyException*/public function getOpeningBalanceDate(): Carbon{diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.phpindex b4e6c3053f..be51e3bd9e 100644--- a/app/Models/AccountMeta.php+++ b/app/Models/AccountMeta.php@@ -42,7 +42,10 @@ class AccountMeta extends Model];/** @var array */protected $fillable = ['account_id', 'name', 'data'];- protected $table = 'account_meta';+ /**+ * @var string+ */+ protected $table = 'account_meta';/*** @return BelongsTodiff --git a/app/Models/AccountType.php b/app/Models/AccountType.phpindex 66eb903b65..d8d00816fb 100644--- a/app/Models/AccountType.php+++ b/app/Models/AccountType.php@@ -31,15 +31,42 @@ use Illuminate\Database\Eloquent\Relations\HasMany;class AccountType extends Model{const DEFAULT = 'Default account';- const CASH = 'Cash account';- const ASSET = 'Asset account';- const EXPENSE = 'Expense account';- const REVENUE = 'Revenue account';+ /**+ *+ */+ const CASH = 'Cash account';+ /**+ *+ */+ const ASSET = 'Asset account';+ /**+ *+ */+ const EXPENSE = 'Expense account';+ /**+ *+ */+ const REVENUE = 'Revenue account';+ /**+ *+ */const INITIAL_BALANCE = 'Initial balance account';- const BENEFICIARY = 'Beneficiary account';- const IMPORT = 'Import account';- const RECONCILIATION = 'Reconciliation account';- const LOAN = 'Loan';+ /**+ *+ */+ const BENEFICIARY = 'Beneficiary account';+ /**+ *+ */+ const IMPORT = 'Import account';+ /**+ *+ */+ const RECONCILIATION = 'Reconciliation account';+ /**+ *+ */+ const LOAN = 'Loan';/*** The attributes that should be casted to native types.*diff --git a/app/Models/Bill.php b/app/Models/Bill.phpindex 7b9a7fd2a7..c00087df17 100644--- a/app/Models/Bill.php+++ b/app/Models/Bill.php@@ -53,11 +53,20 @@ class Bill extends Model'name_encrypted' => 'boolean','match_encrypted' => 'boolean',];+ /**+ * @var array+ */protected $fillable= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip','automatch', 'active',];+ /**+ * @var array+ */protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];- protected $rules = ['name' => 'required|between:1,200'];+ /**+ * @var array+ */+ protected $rules = ['name' => 'required|between:1,200'];/*** @param Bill $valuediff --git a/app/Models/Configuration.php b/app/Models/Configuration.phpindex 028f5faf57..b958ae26c4 100644--- a/app/Models/Configuration.php+++ b/app/Models/Configuration.php@@ -42,6 +42,9 @@ class Configuration extends Model'created_at' => 'datetime','updated_at' => 'datetime',];+ /**+ * @var string+ */protected $table = 'configuration';/**diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.phpindex 74c7e591f9..05e047765e 100644--- a/app/Models/ImportJob.php+++ b/app/Models/ImportJob.php@@ -44,6 +44,9 @@ class ImportJob extends Model'updated_at' => 'datetime',];+ /**+ * @var array+ */protected $validStatus= ['new',@@ -176,6 +179,7 @@ class ImportJob extends Model/*** @return string+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function uploadFileContents(): string{diff --git a/app/Models/LinkType.php b/app/Models/LinkType.phpindex 0c0e0cfac7..ef912d4e64 100644--- a/app/Models/LinkType.php+++ b/app/Models/LinkType.php@@ -65,6 +65,9 @@ class LinkType extends Modelthrow new NotFoundHttpException;}+ /**+ * @return \Illuminate\Database\Eloquent\Relations\HasMany+ */public function transactionJournalLinks(){return $this->hasMany(TransactionJournalLink::class);diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.phpindex 4ec1836c9b..1959008245 100644--- a/app/Models/PiggyBankEvent.php+++ b/app/Models/PiggyBankEvent.php@@ -42,8 +42,14 @@ class PiggyBankEvent extends Model];/** @var array */protected $dates = ['date'];+ /**+ * @var array+ */protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];- protected $hidden = ['amount_encrypted'];+ /**+ * @var array+ */+ protected $hidden = ['amount_encrypted'];/*** @return \Illuminate\Database\Eloquent\Relations\BelongsTodiff --git a/app/Models/Role.php b/app/Models/Role.phpindex 1a52cb8acf..fd9d036988 100644--- a/app/Models/Role.php+++ b/app/Models/Role.php@@ -41,7 +41,10 @@ class Role extends Model'updated_at' => 'datetime',];- protected $fillable = ['name','display_name','description'];+ /**+ * @var array+ */+ protected $fillable = ['name', 'display_name', 'description'];/*** @return \Illuminate\Database\Eloquent\Relations\BelongsToManydiff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.phpindex 33c98ed0b1..e4b28c15c1 100644--- a/app/Models/RuleGroup.php+++ b/app/Models/RuleGroup.php@@ -46,6 +46,9 @@ class RuleGroup extends Model'order' => 'int',];+ /**+ * @var array+ */protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];/**diff --git a/app/Models/SpectreProvider.php b/app/Models/SpectreProvider.phpindex 4cdf9e9d55..f39e20e67f 100644--- a/app/Models/SpectreProvider.php+++ b/app/Models/SpectreProvider.php@@ -27,6 +27,9 @@ class SpectreProvider extends Model'data' => 'array',];+ /**+ * @var array+ */protected $fillable = ['spectre_id', 'code', 'mode', 'name', 'status', 'interactive', 'automatic_fetch', 'country_code', 'data'];}\ No newline at end of filediff --git a/app/Models/Tag.php b/app/Models/Tag.phpindex 555284408c..a1d43a4d9c 100644--- a/app/Models/Tag.php+++ b/app/Models/Tag.php@@ -105,6 +105,7 @@ class Tag extends Model* @param Tag $tag** @return string+ * @throws \FireflyIII\Exceptions\FireflyException*/public static function tagSum(self $tag): string{diff --git a/app/Models/Transaction.php b/app/Models/Transaction.phpindex ca77193672..bc9a9d3455 100644--- a/app/Models/Transaction.php+++ b/app/Models/Transaction.php@@ -84,10 +84,19 @@ class Transaction extends Model'bill_name_encrypted' => 'boolean','reconciled' => 'boolean',];+ /**+ * @var array+ */protected $fillable= ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id','foreign_amount',];+ /**+ * @var array+ */protected $hidden = ['encrypted'];+ /**+ * @var array+ */protected $rules= ['account_id' => 'required|exists:accounts,id',diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.phpindex c3a001f556..ec1d502b2c 100644--- a/app/Models/TransactionJournalLink.php+++ b/app/Models/TransactionJournalLink.php@@ -32,6 +32,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;*/class TransactionJournalLink extends Model{+ /**+ * @var string+ */protected $table = 'journal_links';/**diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.phpindex f8c5274226..f4085a22a6 100644--- a/app/Models/TransactionType.php+++ b/app/Models/TransactionType.php@@ -33,11 +33,26 @@ class TransactionType extends Model{use SoftDeletes;- const WITHDRAWAL = 'Withdrawal';- const DEPOSIT = 'Deposit';- const TRANSFER = 'Transfer';+ /**+ *+ */+ const WITHDRAWAL = 'Withdrawal';+ /**+ *+ */+ const DEPOSIT = 'Deposit';+ /**+ *+ */+ const TRANSFER = 'Transfer';+ /**+ *+ */const OPENING_BALANCE = 'Opening balance';- const RECONCILIATION = 'Reconciliation';+ /**+ *+ */+ const RECONCILIATION = 'Reconciliation';/*** The attributes that should be casted to native types.*diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.phpindex 5637e53681..07ac720e74 100644--- a/app/Providers/RouteServiceProvider.php+++ b/app/Providers/RouteServiceProvider.php@@ -25,6 +25,9 @@ namespace FireflyIII\Providers;use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;use Illuminate\Support\Facades\Route;+/**+ * Class RouteServiceProvider+ */class RouteServiceProvider extends ServiceProvider{/**diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 83f97f97aa..a22fd050d9 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -72,6 +72,7 @@ class AccountRepository implements AccountRepositoryInterface* @param Account $moveTo** @return bool+ * @throws \Exception*/public function destroy(Account $account, Account $moveTo): bool{@@ -239,6 +240,8 @@ class AccountRepository implements AccountRepositoryInterface/*** @param Account $account+ *+ * @throws \Exception*/protected function deleteInitialBalance(Account $account){@@ -410,6 +413,7 @@ class AccountRepository implements AccountRepositoryInterface* @param string $name** @return Account+ * @throws FireflyException*/protected function storeOpposingAccount(string $name): Account{@@ -507,6 +511,7 @@ class AccountRepository implements AccountRepositoryInterface* @param array $data** @return bool+ * @throws \Exception*/protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, array $data): bool{diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.phpindex 42ed53b3ce..b12c1edf6b 100644--- a/app/Repositories/Account/FindAccountsTrait.php+++ b/app/Repositories/Account/FindAccountsTrait.php@@ -211,6 +211,7 @@ trait FindAccountsTrait/*** @return Account+ * @throws FireflyException*/public function getCashAccount(): Account{diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.phpindex a0e62e508e..7a15cadc0d 100644--- a/app/Repositories/Attachment/AttachmentRepository.php+++ b/app/Repositories/Attachment/AttachmentRepository.php@@ -43,6 +43,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface* @param Attachment $attachment** @return bool+ * @throws \Exception*/public function destroy(Attachment $attachment): bool{@@ -129,6 +130,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface* @param Attachment $attachment** @return string+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function getContent(Attachment $attachment): string{diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex 7b1491908e..a78bc195c7 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -48,6 +48,7 @@ class BillRepository implements BillRepositoryInterface* @param Bill $bill** @return bool+ * @throws \Exception*/public function destroy(Bill $bill): bool{@@ -390,6 +391,8 @@ class BillRepository implements BillRepositoryInterface* @param Carbon $date** @return \Carbon\Carbon+ * @throws \FireflyIII\Support\Facades\FireflyException+ * @throws \FireflyIII\Support\Facades\FireflyException*/public function nextDateMatch(Bill $bill, Carbon $date): Carbon{@@ -427,6 +430,9 @@ class BillRepository implements BillRepositoryInterface* @param Carbon $date** @return Carbon+ * @throws \FireflyIII\Support\Facades\FireflyException+ * @throws \FireflyIII\Support\Facades\FireflyException+ * @throws \FireflyIII\Support\Facades\FireflyException*/public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon{diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.phpindex aa60bda9a8..5694793fb6 100644--- a/app/Repositories/Budget/BudgetRepository.php+++ b/app/Repositories/Budget/BudgetRepository.php@@ -51,6 +51,8 @@ class BudgetRepository implements BudgetRepositoryInterface/*** @return bool+ * @throws \Exception+ * @throws \Exception*/public function cleanupBudgets(): bool{@@ -123,6 +125,7 @@ class BudgetRepository implements BudgetRepositoryInterface* @param Budget $budget** @return bool+ * @throws \Exception*/public function destroy(Budget $budget): bool{@@ -604,6 +607,7 @@ class BudgetRepository implements BudgetRepositoryInterface* @param string $amount** @return BudgetLimit+ * @throws \Exception*/public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit{diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.phpindex 659e5dde38..90b879bf47 100644--- a/app/Repositories/Category/CategoryRepository.php+++ b/app/Repositories/Category/CategoryRepository.php@@ -44,6 +44,7 @@ class CategoryRepository implements CategoryRepositoryInterface* @param Category $category** @return bool+ * @throws \Exception*/public function destroy(Category $category): bool{diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.phpindex 85fc0cb189..f88808ecfc 100644--- a/app/Repositories/ExportJob/ExportJobRepository.php+++ b/app/Repositories/ExportJob/ExportJobRepository.php@@ -53,6 +53,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface/*** @return bool+ * @throws \Exception*/public function cleanup(): bool{@@ -137,6 +138,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface* @param ExportJob $job** @return string+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function getContent(ExportJob $job): string{diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.phpindex e43bf02459..feee469c4e 100644--- a/app/Repositories/Journal/JournalRepository.php+++ b/app/Repositories/Journal/JournalRepository.php@@ -99,6 +99,7 @@ class JournalRepository implements JournalRepositoryInterface* @param TransactionJournal $journal** @return bool+ * @throws \Exception*/public function delete(TransactionJournal $journal): bool{@@ -273,6 +274,8 @@ class JournalRepository implements JournalRepositoryInterface* @param array $data** @return TransactionJournal+ * @throws \FireflyIII\Exceptions\FireflyException+ * @throws \FireflyIII\Exceptions\FireflyException*/public function store(array $data): TransactionJournal{@@ -358,6 +361,10 @@ class JournalRepository implements JournalRepositoryInterface* @param array $data** @return TransactionJournal+ * @throws \FireflyIII\Exceptions\FireflyException+ * @throws \FireflyIII\Exceptions\FireflyException+ * @throws \FireflyIII\Exceptions\FireflyException+ * @throws \FireflyIII\Exceptions\FireflyException*/public function update(TransactionJournal $journal, array $data): TransactionJournal{diff --git a/app/Repositories/Journal/SupportJournalsTrait.php b/app/Repositories/Journal/SupportJournalsTrait.phpindex 25a8a02d69..e204553918 100644--- a/app/Repositories/Journal/SupportJournalsTrait.php+++ b/app/Repositories/Journal/SupportJournalsTrait.php@@ -119,6 +119,8 @@ trait SupportJournalsTrait* @param array $data** @return array+ * @throws FireflyException+ * @throws FireflyException*/protected function storeDepositAccounts(User $user, array $data): array{@@ -165,6 +167,8 @@ trait SupportJournalsTrait* @param array $data** @return array+ * @throws FireflyException+ * @throws FireflyException*/protected function storeWithdrawalAccounts(User $user, array $data): array{diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.phpindex 7ff44353f0..2b30a72755 100644--- a/app/Repositories/LinkType/LinkTypeRepository.php+++ b/app/Repositories/LinkType/LinkTypeRepository.php@@ -51,6 +51,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface* @param LinkType $moveTo** @return bool+ * @throws \Exception*/public function destroy(LinkType $linkType, LinkType $moveTo): bool{@@ -66,6 +67,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface* @param TransactionJournalLink $link** @return bool+ * @throws \Exception*/public function destroyLink(TransactionJournalLink $link): bool{diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.phpindex 8f58c366ce..6bfcb3aaf3 100644--- a/app/Repositories/Rule/RuleRepository.php+++ b/app/Repositories/Rule/RuleRepository.php@@ -49,6 +49,9 @@ class RuleRepository implements RuleRepositoryInterface* @param Rule $rule** @return bool+ * @throws \Exception+ * @throws \Exception+ * @throws \Exception*/public function destroy(Rule $rule): bool{diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.phpindex 4c45395466..12ccccf79c 100644--- a/app/Repositories/RuleGroup/RuleGroupRepository.php+++ b/app/Repositories/RuleGroup/RuleGroupRepository.php@@ -49,6 +49,8 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface* @param RuleGroup|null $moveTo** @return bool+ * @throws \Exception+ * @throws \Exception*/public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool{diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.phpindex 05f4807096..1083ff513e 100644--- a/app/Repositories/Tag/TagRepository.php+++ b/app/Repositories/Tag/TagRepository.php@@ -74,6 +74,7 @@ class TagRepository implements TagRepositoryInterface* @param Tag $tag** @return bool+ * @throws \Exception*/public function destroy(Tag $tag): bool{diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.phpindex e37a7028dc..6ecc24c7f7 100644--- a/app/Repositories/User/UserRepository.php+++ b/app/Repositories/User/UserRepository.php@@ -132,6 +132,7 @@ class UserRepository implements UserRepositoryInterface* @param User $user** @return bool+ * @throws \Exception*/public function destroy(User $user): bool{diff --git a/app/Services/Bunq/Object/DeviceServer.php b/app/Services/Bunq/Object/DeviceServer.phpindex f884631c0a..633bc94822 100644--- a/app/Services/Bunq/Object/DeviceServer.php+++ b/app/Services/Bunq/Object/DeviceServer.php@@ -25,6 +25,9 @@ namespace FireflyIII\Services\Bunq\Object;use Carbon\Carbon;use FireflyIII\Services\Bunq\Id\DeviceServerId;+/**+ * Class DeviceServer+ */class DeviceServer extends BunqObject{/** @var Carbon */@@ -40,6 +43,11 @@ class DeviceServer extends BunqObject/** @var Carbon */private $updated;+ /**+ * DeviceServer constructor.+ *+ * @param array $data+ */public function __construct(array $data){$id = new DeviceServerId();diff --git a/app/Services/Bunq/Object/MonetaryAccountProfile.php b/app/Services/Bunq/Object/MonetaryAccountProfile.phpindex 8a4f436f43..4afc014927 100644--- a/app/Services/Bunq/Object/MonetaryAccountProfile.php+++ b/app/Services/Bunq/Object/MonetaryAccountProfile.php@@ -31,7 +31,13 @@ class MonetaryAccountProfile extends BunqObjectprivate $profileActionRequired = '';/** @var Amount */private $profileAmountRequired;+ /**+ * @var null+ */private $profileDrain;+ /**+ * @var null+ */private $profileFill;/**diff --git a/app/Services/Bunq/Object/UserCompany.php b/app/Services/Bunq/Object/UserCompany.phpindex 36f37ce4a4..ba9c5e367a 100644--- a/app/Services/Bunq/Object/UserCompany.php+++ b/app/Services/Bunq/Object/UserCompany.php@@ -29,10 +29,19 @@ use Carbon\Carbon;*/class UserCompany extends BunqObject{+ /**+ * @var+ */private $addressMain;+ /**+ * @var+ */private $addressPostal;/** @var array */private $aliases = [];+ /**+ * @var+ */private $avatar;/** @var string */private $cocNumber = '';@@ -40,7 +49,13 @@ class UserCompany extends BunqObjectprivate $counterBankIban = '';/** @var Carbon */private $created;+ /**+ * @var+ */private $dailyLimit;+ /**+ * @var+ */private $directorAlias;/** @var string */private $displayName = '';diff --git a/app/Services/Bunq/Object/UserPerson.php b/app/Services/Bunq/Object/UserPerson.phpindex 223dfef779..85963a02c0 100644--- a/app/Services/Bunq/Object/UserPerson.php+++ b/app/Services/Bunq/Object/UserPerson.php@@ -29,10 +29,19 @@ use Carbon\Carbon;*/class UserPerson extends BunqObject{+ /**+ * @var+ */private $addressMain;+ /**+ * @var+ */private $addressPostal;/** @var array */private $aliases = [];+ /**+ * @var+ */private $avatar;/** @var array */private $billingContracts = [];@@ -40,8 +49,17 @@ class UserPerson extends BunqObjectprivate $countryOfBirth = '';/** @var Carbon */private $created;+ /**+ * @var+ */private $customer;+ /**+ * @var+ */private $customerLimit;+ /**+ * @var+ */private $dailyLimit;/** @var Carbon */private $dateOfBirth;@@ -77,6 +95,9 @@ class UserPerson extends BunqObjectprivate $publicNickName = '';/** @var string */private $publicUuid = '';+ /**+ * @var mixed+ */private $region;/** @var int */private $sessionTimeout = 0;diff --git a/app/Services/Bunq/Request/BunqRequest.php b/app/Services/Bunq/Request/BunqRequest.phpindex ca73d0443c..2596ae38f5 100644--- a/app/Services/Bunq/Request/BunqRequest.php+++ b/app/Services/Bunq/Request/BunqRequest.php@@ -42,6 +42,9 @@ abstract class BunqRequestprivate $privateKey = '';/** @var string */private $server = '';+ /**+ * @var array+ */private $upperCaseHeaders= ['x-bunq-client-response-id' => 'X-Bunq-Client-Response-Id',@@ -327,6 +330,7 @@ abstract class BunqRequest* @param array $headers** @return array+ * @throws Exception*/protected function sendUnsignedBunqDelete(string $uri, array $headers): array{@@ -356,6 +360,7 @@ abstract class BunqRequest* @param array $headers** @return array+ * @throws Exception*/protected function sendUnsignedBunqPost(string $uri, array $data, array $headers): array{diff --git a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.phpindex 750baef294..0c435e7c29 100644--- a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php+++ b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php@@ -35,6 +35,7 @@ class DeleteDeviceSessionRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Bunq/Request/DeviceServerRequest.php b/app/Services/Bunq/Request/DeviceServerRequest.phpindex a6d817bf7b..8223c453c8 100644--- a/app/Services/Bunq/Request/DeviceServerRequest.php+++ b/app/Services/Bunq/Request/DeviceServerRequest.php@@ -41,6 +41,7 @@ class DeviceServerRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Bunq/Request/DeviceSessionRequest.php b/app/Services/Bunq/Request/DeviceSessionRequest.phpindex 603b795ac6..205c679c65 100644--- a/app/Services/Bunq/Request/DeviceSessionRequest.php+++ b/app/Services/Bunq/Request/DeviceSessionRequest.php@@ -47,6 +47,7 @@ class DeviceSessionRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{@@ -115,6 +116,11 @@ class DeviceSessionRequest extends BunqRequestreturn $deviceSessionId;}+ /**+ * @param array $response+ *+ * @return SessionToken+ */private function extractSessionToken(array $response): SessionToken{$data = $this->getKeyFromResponse('Token', $response);diff --git a/app/Services/Bunq/Request/InstallationTokenRequest.php b/app/Services/Bunq/Request/InstallationTokenRequest.phpindex 8678ebb0c3..27c9c8c6b4 100644--- a/app/Services/Bunq/Request/InstallationTokenRequest.php+++ b/app/Services/Bunq/Request/InstallationTokenRequest.php@@ -41,6 +41,7 @@ class InstallationTokenRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Bunq/Request/ListDeviceServerRequest.php b/app/Services/Bunq/Request/ListDeviceServerRequest.phpindex 4c82e91c8e..7e8896af8c 100644--- a/app/Services/Bunq/Request/ListDeviceServerRequest.php+++ b/app/Services/Bunq/Request/ListDeviceServerRequest.php@@ -44,6 +44,7 @@ class ListDeviceServerRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php b/app/Services/Bunq/Request/ListMonetaryAccountRequest.phpindex bfdf871f32..e272c18fd2 100644--- a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php+++ b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php@@ -40,6 +40,7 @@ class ListMonetaryAccountRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Bunq/Request/ListUserRequest.php b/app/Services/Bunq/Request/ListUserRequest.phpindex 8aa9bf2407..5d5dfc1e13 100644--- a/app/Services/Bunq/Request/ListUserRequest.php+++ b/app/Services/Bunq/Request/ListUserRequest.php@@ -43,6 +43,7 @@ class ListUserRequest extends BunqRequest/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Currency/ExchangeRateInterface.php b/app/Services/Currency/ExchangeRateInterface.phpindex 5e9bdfd080..99d02247c2 100644--- a/app/Services/Currency/ExchangeRateInterface.php+++ b/app/Services/Currency/ExchangeRateInterface.php@@ -27,6 +27,11 @@ use FireflyIII\Models\CurrencyExchangeRate;use FireflyIII\Models\TransactionCurrency;use FireflyIII\User;+/**+ * Interface ExchangeRateInterface+ *+ * @package FireflyIII\Services\Currency+ */interface ExchangeRateInterface{/**diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.phpindex 20f0e4bbfe..52c1f161af 100644--- a/app/Services/Currency/FixerIO.php+++ b/app/Services/Currency/FixerIO.php@@ -38,6 +38,13 @@ class FixerIO implements ExchangeRateInterface/** @var User */protected $user;+ /**+ * @param TransactionCurrency $fromCurrency+ * @param TransactionCurrency $toCurrency+ * @param Carbon $date+ *+ * @return CurrencyExchangeRate+ */public function getRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate{$uri = sprintf('https://api.fixer.io/%s?base=%s&symbols=%s', $date->format('Y-m-d'), $fromCurrency->code, $toCurrency->code);diff --git a/app/Services/Spectre/Request/ListProvidersRequest.php b/app/Services/Spectre/Request/ListProvidersRequest.phpindex a4abd1ad2c..176ebd52f1 100644--- a/app/Services/Spectre/Request/ListProvidersRequest.php+++ b/app/Services/Spectre/Request/ListProvidersRequest.php@@ -29,10 +29,14 @@ use Log;*/class ListProvidersRequest extends SpectreRequest{+ /**+ * @var array+ */protected $providers = [];/***+ * @throws \Exception*/public function call(): void{diff --git a/app/Services/Spectre/Request/SpectreRequest.php b/app/Services/Spectre/Request/SpectreRequest.phpindex a7ce46f4d5..4ca1a3a6e3 100644--- a/app/Services/Spectre/Request/SpectreRequest.php+++ b/app/Services/Spectre/Request/SpectreRequest.php@@ -38,6 +38,9 @@ abstract class SpectreRequest{/** @var string */protected $clientId = '';+ /**+ * @var int+ */protected $expiresAt = 0;/** @var ServerPublicKey */protected $serverPublicKey;@@ -52,6 +55,10 @@ abstract class SpectreRequest/*** SpectreRequest constructor.+ *+ * @param User $user+ *+ * @throws \Illuminate\Container\EntryNotFoundException*/public function __construct(User $user){@@ -279,11 +286,9 @@ abstract class SpectreRequest/*** @param string $uri* @param array $data- * @param array $headers- ** @return array*- * @throws Exception+ * @throws FireflyException*/protected function sendSignedSpectreGet(string $uri, array $data): array{diff --git a/app/Support/ChartColour.php b/app/Support/ChartColour.phpindex 3f2eb21488..d4610950e5 100644--- a/app/Support/ChartColour.php+++ b/app/Support/ChartColour.php@@ -27,6 +27,9 @@ namespace FireflyIII\Support;*/class ChartColour{+ /**+ * @var array+ */public static $colours= [[53, 124, 165],diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.phpindex 0c3b5b5e1f..1d4887c9b2 100644--- a/app/Support/ExpandedForm.php+++ b/app/Support/ExpandedForm.php@@ -78,6 +78,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function checkbox(string $name, $value = 1, $checked = null, $options = []): string{@@ -100,6 +101,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function date(string $name, $value = null, array $options = []): string{@@ -118,6 +120,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function file(string $name, array $options = []): string{@@ -135,6 +138,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function integer(string $name, $value = null, array $options = []): string{@@ -154,6 +158,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function location(string $name, $value = null, array $options = []): string{@@ -226,6 +231,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function multiCheckbox(string $name, array $list = [], $selected = null, array $options = []): string{@@ -247,6 +253,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function multiRadio(string $name, array $list = [], $selected = null, array $options = []): string{@@ -267,6 +274,8 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable+ * @throws Facades\FireflyException*/public function nonSelectableAmount(string $name, $value = null, array $options = []): string{@@ -295,6 +304,8 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable+ * @throws Facades\FireflyException*/public function nonSelectableBalance(string $name, $value = null, array $options = []): string{@@ -324,6 +335,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function number(string $name, $value = null, array $options = []): string{@@ -344,6 +356,7 @@ class ExpandedForm* @param $name** @return string+ * @throws \Throwable*/public function optionsList(string $type, string $name): string{@@ -366,6 +379,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function password(string $name, array $options = []): string{@@ -384,6 +398,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function select(string $name, array $list = [], $selected = null, array $options = []): string{@@ -404,6 +419,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function staticText(string $name, $value, array $options = []): string{@@ -421,6 +437,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function tags(string $name, $value = null, array $options = []): string{@@ -440,6 +457,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function text(string $name, $value = null, array $options = []): string{@@ -458,6 +476,7 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable*/public function textarea(string $name, $value = null, array $options = []): string{@@ -557,6 +576,8 @@ class ExpandedForm* @param array $options** @return string+ * @throws \Throwable+ * @throws Facades\FireflyException*/private function currencyField(string $name, string $view, $value = null, array $options = []): string{diff --git a/app/Support/Import/Configuration/File/Initial.php b/app/Support/Import/Configuration/File/Initial.phpindex 0e5e903ec8..730f524e0b 100644--- a/app/Support/Import/Configuration/File/Initial.php+++ b/app/Support/Import/Configuration/File/Initial.php@@ -34,6 +34,9 @@ use Log;*/class Initial implements ConfigurationInterface{+ /**+ * @var+ */private $job;/**diff --git a/app/Support/Import/Configuration/File/Map.php b/app/Support/Import/Configuration/File/Map.phpindex 20d84bdfb7..c6c4b436e2 100644--- a/app/Support/Import/Configuration/File/Map.php+++ b/app/Support/Import/Configuration/File/Map.php@@ -51,6 +51,7 @@ class Map implements ConfigurationInterface** @throws FireflyException* @throws \League\Csv\Exception+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function getData(): array{@@ -187,6 +188,7 @@ class Map implements ConfigurationInterface/*** @return bool+ * @throws FireflyException*/private function getMappableColumns(): bool{diff --git a/app/Support/Import/Configuration/File/Roles.php b/app/Support/Import/Configuration/File/Roles.phpindex a06785757c..aa98db8563 100644--- a/app/Support/Import/Configuration/File/Roles.php+++ b/app/Support/Import/Configuration/File/Roles.php@@ -34,6 +34,9 @@ use Log;*/class Roles implements ConfigurationInterface{+ /**+ * @var array+ */private $data = [];/** @var ImportJob */private $job;@@ -46,6 +49,7 @@ class Roles implements ConfigurationInterface** @return array* @throws \League\Csv\Exception+ * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException*/public function getData(): array{diff --git a/app/Support/Import/Configuration/Spectre/InputMandatory.php b/app/Support/Import/Configuration/Spectre/InputMandatory.phpindex b1cf305b5f..0af0165860 100644--- a/app/Support/Import/Configuration/Spectre/InputMandatory.php+++ b/app/Support/Import/Configuration/Spectre/InputMandatory.php@@ -22,6 +22,7 @@ class InputMandatory implements ConfigurationInterface* Get the data necessary to show the configuration screen.** @return array+ * @throws FireflyException*/public function getData(): array{@@ -56,7 +57,7 @@ class InputMandatory implements ConfigurationInterface/*** @param ImportJob $job*- * @return ConfigurationInterface+ * @return void*/public function setJob(ImportJob $job){@@ -69,6 +70,7 @@ class InputMandatory implements ConfigurationInterface* @param array $data** @return bool+ * @throws FireflyException*/public function storeConfiguration(array $data): bool{diff --git a/app/Support/Import/Configuration/Spectre/SelectCountry.php b/app/Support/Import/Configuration/Spectre/SelectCountry.phpindex e34c15b4e7..8cf63008ae 100644--- a/app/Support/Import/Configuration/Spectre/SelectCountry.php+++ b/app/Support/Import/Configuration/Spectre/SelectCountry.php@@ -13,6 +13,9 @@ use FireflyIII\Support\Import\Configuration\ConfigurationInterface;*/class SelectCountry implements ConfigurationInterface{+ /**+ * @var array+ */public static $allCountries= ['AF' => 'Afghanistan',@@ -302,7 +305,7 @@ class SelectCountry implements ConfigurationInterface/*** @param ImportJob $job*- * @return ConfigurationInterface+ * @return void*/public function setJob(ImportJob $job){diff --git a/app/Support/Import/Configuration/Spectre/SelectProvider.php b/app/Support/Import/Configuration/Spectre/SelectProvider.phpindex ec41ed78c5..24e9266b72 100644--- a/app/Support/Import/Configuration/Spectre/SelectProvider.php+++ b/app/Support/Import/Configuration/Spectre/SelectProvider.php@@ -50,7 +50,7 @@ class SelectProvider implements ConfigurationInterface/*** @param ImportJob $job*- * @return ConfigurationInterface+ * @return void*/public function setJob(ImportJob $job){diff --git a/app/Support/Import/Information/BunqInformation.php b/app/Support/Import/Information/BunqInformation.phpindex 3c76d63558..6257190dd1 100644--- a/app/Support/Import/Information/BunqInformation.php+++ b/app/Support/Import/Information/BunqInformation.php@@ -61,6 +61,7 @@ class BunqInformation implements InformationInterface* color: any associated color.** @return array+ * @throws FireflyException*/public function getAccounts(): array{@@ -113,6 +114,8 @@ class BunqInformation implements InformationInterface/*** @param SessionToken $sessionToken+ *+ * @throws \Exception*/private function closeSession(SessionToken $sessionToken): void{@@ -135,6 +138,7 @@ class BunqInformation implements InformationInterface* @param int $userId** @return Collection+ * @throws \Exception*/private function getMonetaryAccounts(SessionToken $sessionToken, int $userId): Collection{@@ -159,6 +163,7 @@ class BunqInformation implements InformationInterface* @return int** @throws FireflyException+ * @throws \Exception*/private function getUserInformation(SessionToken $sessionToken): int{@@ -185,6 +190,7 @@ class BunqInformation implements InformationInterface/*** @return SessionToken+ * @throws \Exception*/private function startSession(): SessionToken{diff --git a/app/Support/Import/Information/SpectreInformation.php b/app/Support/Import/Information/SpectreInformation.phpindex 04a3037c3b..0360992adc 100644--- a/app/Support/Import/Information/SpectreInformation.php+++ b/app/Support/Import/Information/SpectreInformation.php@@ -61,6 +61,7 @@ class SpectreInformation implements InformationInterface* color: any associated color.** @return array+ * @throws FireflyException*/public function getAccounts(): array{@@ -113,6 +114,8 @@ class SpectreInformation implements InformationInterface/*** @param SessionToken $sessionToken+ *+ * @throws \Exception*/private function closeSession(SessionToken $sessionToken): void{@@ -135,6 +138,7 @@ class SpectreInformation implements InformationInterface* @param int $userId** @return Collection+ * @throws \Exception*/private function getMonetaryAccounts(SessionToken $sessionToken, int $userId): Collection{@@ -159,6 +163,7 @@ class SpectreInformation implements InformationInterface* @return int** @throws FireflyException+ * @throws \Exception*/private function getUserInformation(SessionToken $sessionToken): int{@@ -185,6 +190,7 @@ class SpectreInformation implements InformationInterface/*** @return SessionToken+ * @throws \Exception*/private function startSession(): SessionToken{diff --git a/app/Support/Models/TransactionJournalTrait.php b/app/Support/Models/TransactionJournalTrait.phpindex 928fa95e79..3f72b7ef0a 100644--- a/app/Support/Models/TransactionJournalTrait.php+++ b/app/Support/Models/TransactionJournalTrait.php@@ -46,7 +46,6 @@ trait TransactionJournalTrait/*** @return string*- * @throws FireflyException*/public function amount(): string{diff --git a/app/Support/Search/Modifier.php b/app/Support/Search/Modifier.phpindex 4d2271a729..08597df9a8 100644--- a/app/Support/Search/Modifier.php+++ b/app/Support/Search/Modifier.php@@ -29,6 +29,9 @@ use FireflyIII\Models\Transaction;use Log;use Steam;+/**+ * Class Modifier+ */class Modifier{/**@@ -52,11 +55,11 @@ class Modifier/*** @param array $modifier* @param Transaction $transaction- * @SuppressWarnings(PHPMD.CyclomaticComplexity)** @return bool*- * @throws FireflyException+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)+ **/public static function apply(array $modifier, Transaction $transaction): bool{diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.phpindex e5aa93b4cb..34ba682fdc 100644--- a/app/Support/Search/Search.php+++ b/app/Support/Search/Search.php@@ -185,6 +185,11 @@ class Search implements SearchInterface$this->user = $user;}+ /**+ * @param JournalCollectorInterface $collector+ *+ * @return JournalCollectorInterface+ */private function applyModifiers(JournalCollectorInterface $collector): JournalCollectorInterface{foreach ($this->modifiers as $modifier) {diff --git a/app/Support/Twig/Extension/TransactionJournal.php b/app/Support/Twig/Extension/TransactionJournal.phpindex 66affea81b..a689998e4b 100644--- a/app/Support/Twig/Extension/TransactionJournal.php+++ b/app/Support/Twig/Extension/TransactionJournal.php@@ -28,6 +28,9 @@ use FireflyIII\Models\TransactionType;use FireflyIII\Support\SingleCacheProperties;use Twig_Extension;+/**+ * Class TransactionJournal+ */class TransactionJournal extends Twig_Extension{/**diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.phpindex b9b1d34e5d..5d35cfce72 100644--- a/app/TransactionRules/Actions/ClearNotes.php+++ b/app/TransactionRules/Actions/ClearNotes.php@@ -51,6 +51,7 @@ class ClearNotes implements ActionInterface* @param TransactionJournal $journal** @return bool+ * @throws \Exception*/public function act(TransactionJournal $journal): bool{diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.phpindex 91c903487e..8df17a605c 100644--- a/app/TransactionRules/Factory/ActionFactory.php+++ b/app/TransactionRules/Factory/ActionFactory.php@@ -47,6 +47,7 @@ class ActionFactory* @param RuleAction $action** @return ActionInterface+ * @throws FireflyException*/public static function getAction(RuleAction $action): ActionInterface{diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.phpindex 35cf8f2431..bb3ace0085 100644--- a/app/TransactionRules/Factory/TriggerFactory.php+++ b/app/TransactionRules/Factory/TriggerFactory.php@@ -49,6 +49,7 @@ class TriggerFactory* @param RuleTrigger $trigger** @return AbstractTrigger+ * @throws FireflyException*/public static function getTrigger(RuleTrigger $trigger){diff --git a/app/TransactionRules/Processor.php b/app/TransactionRules/Processor.phpindex ad4a3560b7..ba1623b315 100644--- a/app/TransactionRules/Processor.php+++ b/app/TransactionRules/Processor.php@@ -95,6 +95,7 @@ final class Processor* @param string $triggerValue** @return Processor+ * @throws \FireflyIII\Exceptions\FireflyException*/public static function makeFromString(string $triggerName, string $triggerValue){@@ -118,6 +119,7 @@ final class Processor* @param array $triggers** @return Processor+ * @throws \FireflyIII\Exceptions\FireflyException*/public static function makeFromStringArray(array $triggers){diff --git a/database/migrations/2017_11_04_170844_changes_for_v470a.php b/database/migrations/2017_11_04_170844_changes_for_v470a.phpindex 4de603be49..a606a89b14 100644--- a/database/migrations/2017_11_04_170844_changes_for_v470a.php+++ b/database/migrations/2017_11_04_170844_changes_for_v470a.php@@ -25,6 +25,9 @@ use Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;+/**+ * Class ChangesForV470a+ */class ChangesForV470a extends Migration{/**diff --git a/database/migrations/2017_12_09_111046_changes_for_spectre.php b/database/migrations/2017_12_09_111046_changes_for_spectre.phpindex ff25ce1aef..52fe7aaf24 100644--- a/database/migrations/2017_12_09_111046_changes_for_spectre.php+++ b/database/migrations/2017_12_09_111046_changes_for_spectre.php@@ -4,6 +4,9 @@ use Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;+/**+ * Class ChangesForSpectre+ */class ChangesForSpectre extends Migration{/**diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.phpindex 03b1443d26..1bb77a3acd 100644--- a/tests/CreatesApplication.php+++ b/tests/CreatesApplication.php@@ -24,6 +24,11 @@ namespace Tests;use Illuminate\Contracts\Console\Kernel;+/**+ * Trait CreatesApplication+ *+ * @package Tests+ */trait CreatesApplication{/**diff --git a/tests/Feature/Controllers/HelpControllerTest.php b/tests/Feature/Controllers/HelpControllerTest.phpindex 3d0fb97476..3ca85b4cc7 100644--- a/tests/Feature/Controllers/HelpControllerTest.php+++ b/tests/Feature/Controllers/HelpControllerTest.php@@ -57,6 +57,8 @@ class HelpControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText+ * @throws \Exception+ * @throws \Exception*/public function testShowBackupFromCache(){@@ -86,6 +88,8 @@ class HelpControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText+ * @throws \Exception+ * @throws \Exception*/public function testShowBackupFromGithub(){diff --git a/tests/Feature/Controllers/ProfileControllerTest.php b/tests/Feature/Controllers/ProfileControllerTest.phpindex de624afad2..dcd3450008 100644--- a/tests/Feature/Controllers/ProfileControllerTest.php+++ b/tests/Feature/Controllers/ProfileControllerTest.php@@ -115,6 +115,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::index* @covers \FireflyIII\Http\Controllers\ProfileController::__construct+ * @throws \Exception*/public function testIndex(){diff --git a/tests/Feature/Controllers/SearchControllerTest.php b/tests/Feature/Controllers/SearchControllerTest.phpindex dea7fb08aa..ff1818faa9 100644--- a/tests/Feature/Controllers/SearchControllerTest.php+++ b/tests/Feature/Controllers/SearchControllerTest.php@@ -23,6 +23,7 @@ declare(strict_types=1);namespace Tests\Feature\Controllers;use FireflyIII\Support\Search\SearchInterface;+use Illuminate\Support\Collection;use Tests\TestCase;/**@@ -48,4 +49,21 @@ class SearchControllerTest extends TestCase$response->assertStatus(200);$response->assertSee('<ol class="breadcrumb">');}++ /**+ * @covers \FireflyIII\Http\Controllers\SearchController::search+ * @covers \FireflyIII\Http\Controllers\SearchController::__construct+ */+ public function testSearch()+ {+ $search = $this->mock(SearchInterface::class);+ $search->shouldReceive('parseQuery')->once();+ $search->shouldReceive('setLimit')->withArgs([50])->once();+ $search->shouldReceive('searchTransactions')->once()->andReturn(new Collection);++ $this->be($this->user());++ $response = $this->get(route('search.search') . '?query=test');+ $response->assertStatus(200);+ }}diff --git a/tests/Feature/Controllers/Transaction/SingleControllerTest.php b/tests/Feature/Controllers/Transaction/SingleControllerTest.phpindex 2a89501f6f..85b6f52fbf 100644--- a/tests/Feature/Controllers/Transaction/SingleControllerTest.php+++ b/tests/Feature/Controllers/Transaction/SingleControllerTest.php@@ -291,6 +291,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::groupedActiveAccountList+ * @throws \Exception*/public function testStoreSuccess(){@@ -338,6 +339,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::update+ * @throws \Exception*/public function testUpdate(){diff --git a/tests/Feature/Controllers/TransactionControllerTest.php b/tests/Feature/Controllers/TransactionControllerTest.phpindex 82208b6e1a..c55c0b423b 100644--- a/tests/Feature/Controllers/TransactionControllerTest.php+++ b/tests/Feature/Controllers/TransactionControllerTest.php@@ -25,6 +25,7 @@ namespace Tests\Feature\Controllers;use Carbon\Carbon;use FireflyIII\Helpers\Collector\JournalCollectorInterface;use FireflyIII\Helpers\Filter\InternalTransferFilter;+use FireflyIII\Models\Transaction;use FireflyIII\Models\TransactionJournal;use FireflyIII\Repositories\Journal\JournalRepositoryInterface;use FireflyIII\Repositories\Journal\JournalTaskerInterface;@@ -41,10 +42,12 @@ use Tests\TestCase;*/class TransactionControllerTest extends TestCase{+/*** @covers \FireflyIII\Http\Controllers\TransactionController::index* @covers \FireflyIII\Http\Controllers\TransactionController::__construct* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview+ * @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/public function testIndex(){@@ -104,9 +107,19 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TransactionController::index* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview+ * @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/public function testIndexByDate(){+ $transaction = new Transaction;+ $transaction->transaction_currency_id = 1;+ $transaction->transaction_currency_symbol = 'x';+ $transaction->transaction_currency_code = 'ABC';+ $transaction->transaction_currency_dp = 2;+ $transaction->transaction_amount = '5';+ $collection = new Collection([$transaction]);++// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -122,7 +135,7 @@ class TransactionControllerTest extends TestCase$collector->shouldReceive('withOpposingAccount')->andReturnSelf();$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));- $collector->shouldReceive('getJournals')->andReturn(new Collection);+ $collector->shouldReceive('getJournals')->andReturn($collection);$this->be($this->user());$response = $this->get(route('transactions.index', ['transfer', '2016-01-01']));@@ -135,9 +148,18 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::index* @covers \FireflyIII\Http\Controllers\TransactionController::__construct* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview+ * @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/public function testIndexDeposit(){+ $transaction = new Transaction;+ $transaction->transaction_currency_id = 1;+ $transaction->transaction_currency_symbol = 'x';+ $transaction->transaction_currency_code = 'ABC';+ $transaction->transaction_currency_dp = 2;+ $transaction->transaction_amount = '5';+ $collection = new Collection([$transaction]);+// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -153,7 +175,7 @@ class TransactionControllerTest extends TestCase$collector->shouldReceive('withOpposingAccount')->andReturnSelf();$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));- $collector->shouldReceive('getJournals')->andReturn(new Collection);+ $collector->shouldReceive('getJournals')->andReturn($collection);$this->be($this->user());$response = $this->get(route('transactions.index', ['deposit']));@@ -166,9 +188,18 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::index* @covers \FireflyIII\Http\Controllers\TransactionController::__construct* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview+ * @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/public function testIndexWithdrawal(){+ $transaction = new Transaction;+ $transaction->transaction_currency_id = 1;+ $transaction->transaction_currency_symbol = 'x';+ $transaction->transaction_currency_code = 'ABC';+ $transaction->transaction_currency_dp = 2;+ $transaction->transaction_amount = '5';+ $collection = new Collection([$transaction]);+// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -184,7 +215,7 @@ class TransactionControllerTest extends TestCase$collector->shouldReceive('withOpposingAccount')->andReturnSelf();$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));- $collector->shouldReceive('getJournals')->andReturn(new Collection);+ $collector->shouldReceive('getJournals')->andReturn($collection);$this->be($this->user());$response = $this->get(route('transactions.index', ['withdrawal']));@@ -193,6 +224,23 @@ class TransactionControllerTest extends TestCase$response->assertSee('<ol class="breadcrumb">');}+ /**+ * @covers \FireflyIII\Http\Controllers\TransactionController::reconcile+ */+ public function testReconcile()+ {+ $data = ['transactions' => [1, 2]];+ $repository = $this->mock(JournalRepositoryInterface::class);+ $repository->shouldReceive('first')->times(1)->andReturn(new TransactionJournal);++ $repository->shouldReceive('findTransaction')->andReturn(new Transaction)->twice();+ $repository->shouldReceive('reconcile')->twice();++ $this->be($this->user());+ $response = $this->post(route('transactions.reconcile'), $data);+ $response->assertStatus(200);+ }+/*** @covers \FireflyIII\Http\Controllers\TransactionController::reorder*/diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.phpindex ab678fd27f..bbeefad328 100644--- a/tests/Feature/ExampleTest.php+++ b/tests/Feature/ExampleTest.php@@ -24,6 +24,9 @@ namespace Tests\Feature;use Tests\TestCase;+/**+ * Class ExampleTest+ */class ExampleTest extends TestCase{/**diff --git a/tests/TestCase.php b/tests/TestCase.phpindex 654d05a173..85c8c5acf3 100644--- a/tests/TestCase.php+++ b/tests/TestCase.php@@ -42,6 +42,8 @@ abstract class TestCase extends BaseTestCase/*** @param User $user* @param string $range+ *+ * @throws \Exception*/public function changeDateRange(User $user, $range){diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.phpindex 9e4aee9865..c1bd9c5cf3 100644--- a/tests/Unit/ExampleTest.php+++ b/tests/Unit/ExampleTest.php@@ -24,6 +24,9 @@ namespace Tests\Unit;use Tests\TestCase;+/**+ * Class ExampleTest+ */class ExampleTest extends TestCase{/**diff --git a/tests/Unit/Helpers/MetaPieChartTest.php b/tests/Unit/Helpers/MetaPieChartTest.phpindex 2307f88829..974064ba7e 100644--- a/tests/Unit/Helpers/MetaPieChartTest.php+++ b/tests/Unit/Helpers/MetaPieChartTest.php@@ -161,6 +161,9 @@ class MetaPieChartTest extends TestCase$this->assertTrue(true);}+ /**+ * @return Collection+ */private function fakeOthers(): Collection{$set = new Collection;@@ -181,6 +184,9 @@ class MetaPieChartTest extends TestCasereturn $set;}+ /**+ * @return Collection+ */private function fakeTransactions(): Collection{$set = new Collection;diff --git a/tests/Unit/TransactionRules/Actions/AddTagTest.php b/tests/Unit/TransactionRules/Actions/AddTagTest.phpindex 35aa2e12cf..80eba90003 100644--- a/tests/Unit/TransactionRules/Actions/AddTagTest.php+++ b/tests/Unit/TransactionRules/Actions/AddTagTest.php@@ -28,6 +28,9 @@ use FireflyIII\Models\TransactionJournal;use FireflyIII\TransactionRules\Actions\AddTag;use Tests\TestCase;+/**+ * Class AddTagTest+ */class AddTagTest extends TestCase{/**diff --git a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.phpindex c349c688bd..39f0c91df8 100644--- a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php+++ b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php@@ -27,6 +27,9 @@ use FireflyIII\Models\TransactionJournal;use FireflyIII\TransactionRules\Actions\AppendDescription;use Tests\TestCase;+/**+ * Class AppendDescriptionTest+ */class AppendDescriptionTest extends TestCase{/**