Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Cleanup and add various warnings.
James Cole265dd372126e
diff --git a/app/Handlers/Events/ConnectJournalToPiggyBank.php b/app/Handlers/Events/ConnectJournalToPiggyBank.phpindex d4c9cef764..4b599a9dec 100644--- a/app/Handlers/Events/ConnectJournalToPiggyBank.php+++ b/app/Handlers/Events/ConnectJournalToPiggyBank.php@@ -28,8 +28,6 @@ class ConnectJournalToPiggyBank/*** Handle the event when journal is saved.*- * @SuppressWarnings(PHPMD.CyclomaticComplexity)- ** @param JournalCreated $event** @return booleandiff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.phpindex 00587db566..144cd44693 100644--- a/app/Http/Controllers/BudgetController.php+++ b/app/Http/Controllers/BudgetController.php@@ -21,7 +21,6 @@ use View;* Class BudgetController** @package FireflyIII\Http\Controllers- * @SuppressWarnings(PHPMD.TooManyMethods)*/class BudgetController extends Controller{diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.phpindex 6c33fccc8c..92ceb4cb88 100644--- a/app/Http/Controllers/PiggyBankController.php+++ b/app/Http/Controllers/PiggyBankController.php@@ -18,7 +18,6 @@ use View;/***- * @SuppressWarnings(PHPMD.TooManyMethods)** Class PiggyBankController*diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.phpindex ac2017b182..27ef9622d5 100644--- a/app/Http/Middleware/Range.php+++ b/app/Http/Middleware/Range.php@@ -42,7 +42,6 @@ class Range** @param \Illuminate\Http\Request $request* @param \Closure $theNext- * @SuppressWarnings(PHPMD.CyclomaticComplexity)** @return mixed*/diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.phpindex 141bb78f3e..b3377b4a47 100644--- a/app/Http/Requests/JournalFormRequest.php+++ b/app/Http/Requests/JournalFormRequest.php@@ -51,7 +51,6 @@ class JournalFormRequest extends Request/*** @return array* @throws Exception- * @SuppressWarnings(PHPMD.CyclomaticComplexity)*/public function rules(){diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 683310dbfc..91f75cb286 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -50,7 +50,6 @@ class Account extends Model/*** @param array $fields- * @SuppressWarnings(PHPMD.CyclomaticComplexity)** @return Account|null*/diff --git a/app/Models/Category.php b/app/Models/Category.phpindex fca9c789a9..4ddb31a7a7 100644--- a/app/Models/Category.php+++ b/app/Models/Category.php@@ -29,7 +29,6 @@ class Category extends Model/*** @param array $fields- * @SuppressWarnings(PHPMD.CyclomaticComplexity)** @return Category*/diff --git a/app/Models/Tag.php b/app/Models/Tag.phpindex e1ffe69155..d1bd328143 100644--- a/app/Models/Tag.php+++ b/app/Models/Tag.php@@ -44,8 +44,6 @@ class Tag extends Model/*** @param array $fields- * @SuppressWarnings(PHPMD.CyclomaticComplexity)- * @SuppressWarnings(PHPMD.NPathComplexity)** @return Tag|null*/diff --git a/app/Providers/ConfigServiceProvider.php b/app/Providers/ConfigServiceProvider.phpindex 53d1e50b0b..7ee3b11047 100644--- a/app/Providers/ConfigServiceProvider.php+++ b/app/Providers/ConfigServiceProvider.php@@ -19,7 +19,6 @@ class ConfigServiceProvider extends ServiceProvider* to overwrite any "vendor" or package configuration that you may want to* modify before the application handles the incoming request / command.*- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)** @return void*/diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.phpindex d04d6c2d9c..81df15ccac 100644--- a/app/Providers/FireflyServiceProvider.php+++ b/app/Providers/FireflyServiceProvider.php@@ -47,7 +47,7 @@ class FireflyServiceProvider extends ServiceProvider}/**- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)+ **/public function register(){diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.phpindex 4e40f5bec8..f946ad464e 100644--- a/app/Providers/RouteServiceProvider.php+++ b/app/Providers/RouteServiceProvider.php@@ -39,6 +39,8 @@ class RouteServiceProvider extends ServiceProvider** @param \Illuminate\Routing\Router $router*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return void*/public function map(Router $router)diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 10d2a1bab2..dd18c01265 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -24,7 +24,6 @@ use Steam;/**- * @SuppressWarnings(PHPMD.TooManyMethods)** Class AccountRepository*@@ -609,7 +608,6 @@ class AccountRepository implements AccountRepositoryInterface* @param Account $account* @param array $data*- * @SuppressWarnings(PHPMD.CyclomaticComplexity)*/protected function updateMetadata(Account $account, array $data){diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.phpindex 59832ff3e4..59085824ad 100644--- a/app/Repositories/Tag/TagRepository.php+++ b/app/Repositories/Tag/TagRepository.php@@ -24,7 +24,6 @@ class TagRepository implements TagRepositoryInterface/**- * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.** @param TransactionJournal $journal* @param Tag $tag@@ -33,7 +32,6 @@ class TagRepository implements TagRepositoryInterface*/public function connect(TransactionJournal $journal, Tag $tag){-/** Already connected:*/diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.phpindex 59e3db0fb5..d9153dc098 100644--- a/app/Support/ExpandedForm.php+++ b/app/Support/ExpandedForm.php@@ -15,7 +15,6 @@ use Session;** @package FireflyIII\Support*- * @SuppressWarnings(PHPMD.TooManyMethods)*/class ExpandedForm{diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.phpindex bf2a1c725a..4534c3f86b 100644--- a/app/Support/Twig/General.php+++ b/app/Support/Twig/General.php@@ -24,7 +24,6 @@ class General extends Twig_Extension/**- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)* @return array*/public function getFilters()diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.phpindex 1cd7aa0cf6..6d0d056296 100644--- a/app/Validation/FireflyValidator.php+++ b/app/Validation/FireflyValidator.php@@ -28,7 +28,6 @@ class FireflyValidator extends Validator* @param array $rules* @param array $messages* @param array $customAttributes- * @SuppressWarnings(PHPMD.ExcessiveParameterList)*/public function __construct(TranslatorInterface $translator, array $data, array $rules, array $messages = [], array $customAttributes = []){@@ -40,10 +39,12 @@ class FireflyValidator extends Validator* @param $value* @param $parameters*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/- public function validateBelongsToUser($attribute, $value, $parameters)- {+ public function validateBelongsToUser($attribute, $value, $parameters+ ) {$count = DB::table($parameters[0])->where('user_id', Auth::user()->id)->where('id', $value)->count();if ($count == 1) {@@ -58,6 +59,8 @@ class FireflyValidator extends Validator* @param $attribute* @param $value*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/public function validateIban($attribute, $value)@@ -87,6 +90,8 @@ class FireflyValidator extends Validator* @param $value* @param $parameters*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/public function validateUniqueAccountForUser($attribute, $value, $parameters)@@ -232,6 +237,8 @@ class FireflyValidator extends Validator* @param $value* @param $parameters*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/public function validateUniqueForUser($attribute, $value, $parameters)@@ -261,6 +268,8 @@ class FireflyValidator extends Validator* @param $value* @param $parameters*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/public function validateUniqueObjectForUser($attribute, $value, $parameters)@@ -291,6 +300,8 @@ class FireflyValidator extends Validator* @param $value* @param $parameters*+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)+ ** @return bool*/public function validateUniquePiggyBankForUser($attribute, $value, $parameters)