Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Removed a bunch of methods and code that wasn't used. Also added a repository for repeated expenses.
James Colec6b6ed7fa8f3
diff --git a/app/lib/FireflyIII/Database/Account.php b/app/lib/FireflyIII/Database/Account.phpindex b4960b41dd..1b598ac76f 100644--- a/app/lib/FireflyIII/Database/Account.php+++ b/app/lib/FireflyIII/Database/Account.php@@ -81,11 +81,10 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface/*** @param array $types- * @param array $parameters** @return Collection*/- public function getAccountsByType(array $types, array $parameters = [])+ public function getAccountsByType(array $types){/** Basic query:@@ -103,10 +102,9 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface/** Not used, but useful for the balance within a certain month / year.*/- $balanceOnDate = isset($parameters['date']) ? $parameters['date'] : Carbon::now();$query->where(- function ($q) use ($balanceOnDate) {- $q->where('transaction_journals.date', '<=', $balanceOnDate->format('Y-m-d'));+ function ($q) {+ $q->where('transaction_journals.date', '<=', Carbon::now()->format('Y-m-d'));$q->orWhereNull('transaction_journals.date');});@@ -118,23 +116,6 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface*/$query->orderBy('name', 'ASC');- /*- * If present, process parameters for searching.- */- if (isset($parameters['search'])) {- $query->where('name', 'LIKE', '%' . e($parameters['search']['value'] . '%'));- }-- /*- * If present, start at $start:- */- if (isset($parameters['start'])) {- $query->skip(intval($parameters['start']));- }- if (isset($parameters['length'])) {- $query->take(intval($parameters['length']));- }-return $query->get(['accounts.*', \DB::Raw('SUM(`transactions`.`amount`) as `balance`')]);}@@ -145,43 +126,28 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface** @return Collection*/- public function getAssetAccounts(array $parameters = [])+ public function getAssetAccounts(){- return $this->getAccountsByType(['Default account', 'Asset account'], $parameters);-- }+ return $this->getAccountsByType(['Default account', 'Asset account']);- /**- * Get all default accounts.- *- * @return Collection- */- public function getDefaultAccounts()- {- // TODO: Implement getDefaultAccounts() method.- throw new NotImplementedException;}/**- * @param array $parameters- ** @return Collection*/- public function getExpenseAccounts(array $parameters = [])+ public function getExpenseAccounts(){- return $this->getAccountsByType(['Expense account', 'Beneficiary account'], $parameters);+ return $this->getAccountsByType(['Expense account', 'Beneficiary account']);}/*** Get all revenue accounts.*- * @param array $parameters- ** @return Collection*/- public function getRevenueAccounts(array $parameters = [])+ public function getRevenueAccounts(){- return $this->getAccountsByType(['Revenue account'], $parameters);+ return $this->getAccountsByType(['Revenue account']);}/**@@ -397,20 +363,6 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterfacereturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/AccountType.php b/app/lib/FireflyIII/Database/AccountType.phpindex 302b8b2335..9d945faffa 100644--- a/app/lib/FireflyIII/Database/AccountType.php+++ b/app/lib/FireflyIII/Database/AccountType.php@@ -15,7 +15,7 @@ use LaravelBook\Ardent\Ardent;** @package FireflyIII\Database*/-class AccountType implements AccountTypeInterface, CUD, CommonDatabaseCalls+class AccountType implements CUD, CommonDatabaseCalls{/**@@ -66,20 +66,6 @@ class AccountType implements AccountTypeInterface, CUD, CommonDatabaseCallsthrow new NotImplementedException;}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/Budget.php b/app/lib/FireflyIII/Database/Budget.phpindex 2d4a0474e5..5fc1eeb4f0 100644--- a/app/lib/FireflyIII/Database/Budget.php+++ b/app/lib/FireflyIII/Database/Budget.php@@ -119,20 +119,6 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterfacereturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/Category.php b/app/lib/FireflyIII/Database/Category.phpindex 5857f84326..c04d4aa6b7 100644--- a/app/lib/FireflyIII/Database/Category.php+++ b/app/lib/FireflyIII/Database/Category.php@@ -15,7 +15,7 @@ use LaravelBook\Ardent\Ardent;** @package FireflyIII\Database*/-class Category implements CUD, CommonDatabaseCalls, CategoryInterface+class Category implements CUD, CommonDatabaseCalls{use SwitchUser;@@ -118,20 +118,6 @@ class Category implements CUD, CommonDatabaseCalls, CategoryInterfacereturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/Ifaces/AccountInterface.php b/app/lib/FireflyIII/Database/Ifaces/AccountInterface.phpindex 2871e988f7..614c476556 100644--- a/app/lib/FireflyIII/Database/Ifaces/AccountInterface.php+++ b/app/lib/FireflyIII/Database/Ifaces/AccountInterface.php@@ -42,12 +42,6 @@ interface AccountInterface*/public function countRevenueAccounts();- /**- * @param array $parameters- *- * @return Collection- */-/*** @param \Account $account*@@ -59,38 +53,29 @@ interface AccountInterface* Get all accounts of the selected types. Is also capable of handling DataTables' parameters.** @param array $types- * @param array $parameters** @return Collection*/- public function getAccountsByType(array $types, array $parameters = []);+ public function getAccountsByType(array $types);/*** Get all asset accounts. The parameters are optional and are provided by the DataTables plugin.*- * @param array $parameters- ** @return Collection*/- public function getAssetAccounts(array $parameters = []);+ public function getAssetAccounts();/**- * Get all default accounts.- ** @return Collection*/- public function getDefaultAccounts();-- public function getExpenseAccounts(array $parameters = []);+ public function getExpenseAccounts();/*** Get all revenue accounts.*- * @param array $parameters- ** @return Collection*/- public function getRevenueAccounts(array $parameters = []);+ public function getRevenueAccounts();/*** @param \Account $accountdiff --git a/app/lib/FireflyIII/Database/Ifaces/AccountTypeInterface.php b/app/lib/FireflyIII/Database/Ifaces/AccountTypeInterface.phpdeleted file mode 100644index d06621d702..0000000000--- a/app/lib/FireflyIII/Database/Ifaces/AccountTypeInterface.php+++ /dev/null@@ -1,13 +0,0 @@-<?php-namespace FireflyIII\Database\Ifaces;--/**- * Interface AccountTypeInterface- *- * @package FireflyIII\Database- */-interface AccountTypeInterface-{---}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Ifaces/CUD.php b/app/lib/FireflyIII/Database/Ifaces/CUD.phpindex 70578007e7..fd4b4ab47d 100644--- a/app/lib/FireflyIII/Database/Ifaces/CUD.php+++ b/app/lib/FireflyIII/Database/Ifaces/CUD.php@@ -44,14 +44,4 @@ interface CUD*/public function validate(array $model);- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model);--}\ No newline at end of file+}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Ifaces/CategoryInterface.php b/app/lib/FireflyIII/Database/Ifaces/CategoryInterface.phpdeleted file mode 100644index 1ba540f38f..0000000000--- a/app/lib/FireflyIII/Database/Ifaces/CategoryInterface.php+++ /dev/null@@ -1,13 +0,0 @@-<?php--namespace FireflyIII\Database\Ifaces;--/**- * Interface CategoryInterface- *- * @package FireflyIII\Database- */-interface CategoryInterface-{--}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Ifaces/RecurringTransactionInterface.php b/app/lib/FireflyIII/Database/Ifaces/RecurringTransactionInterface.phpdeleted file mode 100644index a0bb8f758b..0000000000--- a/app/lib/FireflyIII/Database/Ifaces/RecurringTransactionInterface.php+++ /dev/null@@ -1,12 +0,0 @@-<?php--namespace FireflyIII\Database\Ifaces;--/**- * Interface AccountInterface- *- * @package FireflyIII\Database- */-interface RecurringTransactionInterface-{-}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Ifaces/TransactionInterface.php b/app/lib/FireflyIII/Database/Ifaces/TransactionInterface.phpdeleted file mode 100644index 768d4d58ae..0000000000--- a/app/lib/FireflyIII/Database/Ifaces/TransactionInterface.php+++ /dev/null@@ -1,14 +0,0 @@-<?php--namespace FireflyIII\Database\Ifaces;---/**- * Interface TransactionInterface- *- * @package FireflyIII\Database- */-interface TransactionInterface-{--}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Ifaces/TransactionTypeInterface.php b/app/lib/FireflyIII/Database/Ifaces/TransactionTypeInterface.phpdeleted file mode 100644index 4d0c7c2c11..0000000000--- a/app/lib/FireflyIII/Database/Ifaces/TransactionTypeInterface.php+++ /dev/null@@ -1,14 +0,0 @@-<?php--namespace FireflyIII\Database\Ifaces;---/**- * Interface TransactionTypeInterface- *- * @package FireflyIII\Database- */-interface TransactionTypeInterface-{--}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Piggybank.php b/app/lib/FireflyIII/Database/Piggybank.phpindex 7534796a7d..d07c870d06 100644--- a/app/lib/FireflyIII/Database/Piggybank.php+++ b/app/lib/FireflyIII/Database/Piggybank.php@@ -138,7 +138,7 @@ class Piggybank implements CUD, CommonDatabaseCalls, PiggybankInterfacetry {new Carbon($model['targetdate']);} catch (\Exception $e) {- $errors->add('date', 'Invalid date.');+ $errors->add('targetdate', 'Invalid date.');}}if (floatval($model['targetamount']) < 0.01) {@@ -183,20 +183,6 @@ class Piggybank implements CUD, CommonDatabaseCalls, PiggybankInterfacereturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*@@ -264,7 +250,7 @@ class Piggybank implements CUD, CommonDatabaseCalls, PiggybankInterface*/public function leftOnAccount(\Account $account){- $balance = Steam::balance($account);+ $balance = \Steam::balance($account);/** @var \Piggybank $p */foreach ($account->piggybanks()->get() as $p) {$balance -= $p->currentRelevantRep()->currentamount;diff --git a/app/lib/FireflyIII/Database/Recurring.php b/app/lib/FireflyIII/Database/Recurring.phpindex 6329cde2ec..b781b4e611 100644--- a/app/lib/FireflyIII/Database/Recurring.php+++ b/app/lib/FireflyIII/Database/Recurring.php@@ -177,20 +177,6 @@ class Recurring implements CUD, CommonDatabaseCalls, RecurringInterfacereturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/RepeatedExpense.php b/app/lib/FireflyIII/Database/RepeatedExpense.phpnew file mode 100644index 0000000000..2b50bf6bf1--- /dev/null+++ b/app/lib/FireflyIII/Database/RepeatedExpense.php@@ -0,0 +1,229 @@+<?php++namespace FireflyIII\Database;+++use Carbon\Carbon;+use FireflyIII\Database\Ifaces\CommonDatabaseCalls;+use FireflyIII\Database\Ifaces\CUD;+use FireflyIII\Database\Ifaces\PiggybankInterface;+use FireflyIII\Exception\NotImplementedException;+use Illuminate\Support\Collection;+use Illuminate\Support\MessageBag;+use LaravelBook\Ardent\Ardent;++class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggybankInterface+{+ use SwitchUser;++ /**+ *+ */+ public function __construct()+ {+ $this->setUser(\Auth::user());+ }++ /**+ * @param Ardent $model+ *+ * @return bool+ */+ public function destroy(Ardent $model)+ {+ // TODO: Implement destroy() method.+ throw new NotImplementedException;+ }++ /**+ * @param array $data+ *+ * @return Ardent+ */+ public function store(array $data)+ {++ $data['rep_every'] = isset($data['rep_every']) ? $data['rep_every'] : 0;+ $data['reminder_skip'] = isset($data['reminder_skip']) ? $data['reminder_skip'] : 0;+ $data['order'] = isset($data['order']) ? $data['order'] : 0;+ $data['remind_me'] = isset($data['remind_me']) ? intval($data['remind_me']) : 0;+ $data['startdate'] = isset($data['startdate']) ? $data['startdate'] : Carbon::now()->format('Y-m-d');+ $data['targetdate'] = isset($data['targetdate']) && $data['targetdate'] != '' ? $data['targetdate'] : null;+ $data['account_id'] = intval($data['account_id']);+++ if ($data['remind_me'] == 0) {+ $data['reminder'] = null;+ }+++ $repeated = new \Piggybank($data);+ if (!$repeated->validate()) {+ var_dump($repeated->errors()->all());+ exit;+ }+ $repeated->save();++ return $repeated;+ }++ /**+ * @param Ardent $model+ * @param array $data+ *+ * @return bool+ */+ public function update(Ardent $model, array $data)+ {+ // TODO: Implement update() method.+ throw new NotImplementedException;+ }++ /**+ * Validates an array. Returns an array containing MessageBags+ * errors/warnings/successes.+ *+ * @param array $model+ *+ * @return array+ */+ public function validate(array $model)+ {+ $warnings = new MessageBag;+ $successes = new MessageBag;+ $errors = new MessageBag;++ /*+ * Name validation:+ */+ if (!isset($model['name'])) {+ $errors->add('name', 'Name is mandatory');+ }++ if (isset($model['name']) && strlen($model['name']) == 0) {+ $errors->add('name', 'Name is too short');+ }+ if (isset($model['name']) && strlen($model['name']) > 100) {+ $errors->add('name', 'Name is too long');+ }++ if (intval($model['account_id']) == 0) {+ $errors->add('account_id', 'Account is mandatory');+ }+ if ($model['targetdate'] == '' && isset($model['remind_me']) && intval($model['remind_me']) == 1) {+ $errors->add('targetdate', 'Target date is mandatory when setting reminders.');+ }+ if ($model['targetdate'] != '') {+ try {+ new Carbon($model['targetdate']);+ } catch (\Exception $e) {+ $errors->add('targetdate', 'Invalid date.');+ }+ } else {+ $errors->add('targetdate', 'Invalid target date.');+ }+ if (floatval($model['targetamount']) < 0.01) {+ $errors->add('targetamount', 'Amount should be above 0.01.');+ }+ if (!in_array(ucfirst($model['reminder']), \Config::get('firefly.piggybank_periods'))) {+ $errors->add('reminder', 'Invalid reminder period (' . $model['reminder'] . ')');+ }++ if (!in_array(ucfirst($model['rep_length']), \Config::get('firefly.piggybank_periods'))) {+ $errors->add('rep_length', 'Invalid repeat period (' . $model['rep_length'] . ')');+ }++ // check period.+ if (!$errors->has('reminder') && !$errors->has('targetdate') && isset($model['remind_me']) && intval($model['remind_me']) == 1) {+ $today = new Carbon;+ $target = new Carbon($model['targetdate']);+ switch ($model['reminder']) {+ case 'week':+ $today->addWeek();+ break;+ case 'month':+ $today->addMonth();+ break;+ case 'year':+ $today->addYear();+ break;+ }+ if ($today > $target) {+ $errors->add('reminder', 'Target date is too close to today to set reminders.');+ }+ }++ $validator = \Validator::make($model, \Piggybank::$rules);+ if ($validator->invalid()) {+ $errors->merge($errors);+ }++ // add ok messages.+ $list = ['name', 'account_id', 'rep_every', 'rep_times', 'rep_length', 'targetamount', 'targetdate', 'remind_me', 'reminder'];+ foreach ($list as $entry) {+ if (!$errors->has($entry) && !$warnings->has($entry)) {+ $successes->add($entry, 'OK');+ }+ }++ return ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];+ }++ /**+ * Returns an object with id $id.+ *+ * @param int $id+ *+ * @return Ardent+ */+ public function find($id)+ {+ // TODO: Implement find() method.+ throw new NotImplementedException;+ }++ /**+ * Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.+ *+ * @param $what+ *+ * @return \AccountType|null+ */+ public function findByWhat($what)+ {+ // TODO: Implement findByWhat() method.+ throw new NotImplementedException;+ }++ /**+ * Returns all objects.+ *+ * @return Collection+ */+ public function get()+ {+ return $this->getUser()->piggybanks()->where('repeats', 1)->get();+ }++ /**+ * @param array $ids+ *+ * @return Collection+ */+ public function getByIds(array $ids)+ {+ // TODO: Implement getByIds() method.+ throw new NotImplementedException;+ }++ /**+ * @param \Account $account+ *+ * @return float+ */+ public function leftOnAccount(\Account $account)+ {+ // TODO: Implement leftOnAccount() method.+ throw new NotImplementedException;+ }+}\ No newline at end of filediff --git a/app/lib/FireflyIII/Database/Transaction.php b/app/lib/FireflyIII/Database/Transaction.phpindex 26a3d252d5..3ab54aea75 100644--- a/app/lib/FireflyIII/Database/Transaction.php+++ b/app/lib/FireflyIII/Database/Transaction.php@@ -16,7 +16,7 @@ use LaravelBook\Ardent\Ardent;** @package FireflyIII\Database*/-class Transaction implements TransactionInterface, CUD, CommonDatabaseCalls+class Transaction implements CUD, CommonDatabaseCalls{use SwitchUser;@@ -135,20 +135,6 @@ class Transaction implements TransactionInterface, CUD, CommonDatabaseCallsreturn ['errors' => $errors, 'warnings' => $warnings, 'successes' => $successes];}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/TransactionCurrency.php b/app/lib/FireflyIII/Database/TransactionCurrency.phpindex 82a4639345..6de3860ada 100644--- a/app/lib/FireflyIII/Database/TransactionCurrency.php+++ b/app/lib/FireflyIII/Database/TransactionCurrency.php@@ -3,132 +3,16 @@namespace FireflyIII\Database;-use FireflyIII\Database\Ifaces\CommonDatabaseCalls;-use FireflyIII\Database\Ifaces\CUD;use FireflyIII\Database\Ifaces\TransactionCurrencyInterface;-use FireflyIII\Exception\NotImplementedException;-use Illuminate\Support\Collection;-use LaravelBook\Ardent\Ardent;/*** Class TransactionType** @package FireflyIII\Database*/-class TransactionCurrency implements TransactionCurrencyInterface, CUD, CommonDatabaseCalls+class TransactionCurrency implements TransactionCurrencyInterface{-- /**- * @param Ardent $model- *- * @return bool- */- public function destroy(Ardent $model)- {- // TODO: Implement destroy() method.- throw new NotImplementedException;- }-- /**- * @param array $data- *- * @return Ardent- */- public function store(array $data)- {- // TODO: Implement store() method.- throw new NotImplementedException;- }-- /**- * @param Ardent $model- * @param array $data- *- * @return bool- */- public function update(Ardent $model, array $data)- {- // TODO: Implement update() method.- throw new NotImplementedException;- }-- /**- * Validates an array. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param array $model- *- * @return array- */- public function validate(array $model)- {- // TODO: Implement validate() method.- throw new NotImplementedException;- }-- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-- /**- * Returns an object with id $id.- *- * @param int $id- *- * @return Ardent- */- public function find($id)- {- // TODO: Implement find() method.- throw new NotImplementedException;- }-- /**- * Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.- *- * @param $what- *- * @return \AccountType|null- */- public function findByWhat($what)- {- // TODO: Implement findByWhat() method.- throw new NotImplementedException;- }-- /**- * Returns all objects.- *- * @return Collection- */- public function get()- {- // TODO: Implement get() method.- throw new NotImplementedException;- }-- /**- * @param array $ids- *- * @return Collection- */- public function getByIds(array $ids)- {- // TODO: Implement getByIds() method.- throw new NotImplementedException;- }-/*** @param string $code*diff --git a/app/lib/FireflyIII/Database/TransactionJournal.php b/app/lib/FireflyIII/Database/TransactionJournal.phpindex b7c2ce5a75..aa6c8a8044 100644--- a/app/lib/FireflyIII/Database/TransactionJournal.php+++ b/app/lib/FireflyIII/Database/TransactionJournal.php@@ -428,20 +428,6 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*diff --git a/app/lib/FireflyIII/Database/TransactionType.php b/app/lib/FireflyIII/Database/TransactionType.phpindex 8b4aad2fef..a0c215783d 100644--- a/app/lib/FireflyIII/Database/TransactionType.php+++ b/app/lib/FireflyIII/Database/TransactionType.php@@ -16,7 +16,7 @@ use LaravelBook\Ardent\Ardent;** @package FireflyIII\Database*/-class TransactionType implements TransactionTypeInterface, CUD, CommonDatabaseCalls+class TransactionType implements CUD, CommonDatabaseCalls{/**@@ -67,20 +67,6 @@ class TransactionType implements TransactionTypeInterface, CUD, CommonDatabaseCathrow new NotImplementedException;}- /**- * Validates a model. Returns an array containing MessageBags- * errors/warnings/successes.- *- * @param Ardent $model- *- * @return array- */- public function validateObject(Ardent $model)- {- // TODO: Implement validateObject() method.- throw new NotImplementedException;- }-/*** Returns an object with id $id.*