Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Various code cleanup.
James Cole60abe2a3affd
diff --git a/app/Models/LimitRepetition.php b/app/Models/LimitRepetition.phpdeleted file mode 100644index 2493c9ac1f..0000000000--- a/app/Models/LimitRepetition.php+++ /dev/null@@ -1,86 +0,0 @@-<?php-/**- * LimitRepetition.php- * Copyright (c) 2017 [email protected]- *- * This file is part of Firefly III.- *- * Firefly III is free software: you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation, either version 3 of the License, or- * (at your option) any later version.- *- * Firefly III is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.- */-declare(strict_types=1);--namespace FireflyIII\Models;--use Carbon\Carbon;-use Illuminate\Database\Eloquent\Builder;-use Illuminate\Database\Eloquent\Model;--/**- * Class LimitRepetition.- *- * @deprecated- */-class LimitRepetition extends Model-{- /**- * The attributes that should be casted to native types.- *- * @var array- */- protected $casts- = [- 'created_at' => 'datetime',- 'updated_at' => 'datetime',- 'startdate' => 'date',- 'enddate' => 'date',- ];- /** @var array */- protected $dates = ['startdate', 'enddate'];- /** @var array */- protected $hidden = ['amount_encrypted'];-- /**- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo- */- public function budgetLimit()- {- return $this->belongsTo('FireflyIII\Models\BudgetLimit');- }-- /**- * @param Builder $query- * @param Carbon $date- */- public function scopeAfter(Builder $query, Carbon $date)- {- $query->where('limit_repetitions.startdate', '>=', $date->format('Y-m-d 00:00:00'));- }-- /**- * @param Builder $query- * @param Carbon $date- */- public function scopeBefore(Builder $query, Carbon $date)- {- $query->where('limit_repetitions.enddate', '<=', $date->format('Y-m-d 00:00:00'));- }-- /**- * @param $value- */- public function setAmountAttribute($value)- {- $this->attributes['amount'] = strval(round($value, 2));- }-}diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.phpindex 18c91905fd..7f041d1902 100644--- a/app/Providers/AccountServiceProvider.php+++ b/app/Providers/AccountServiceProvider.php@@ -71,7 +71,7 @@ class AccountServiceProvider extends ServiceProvider}/**- *+ * Register the tasker.*/private function registerTasker(){diff --git a/app/Providers/AdminServiceProvider.php b/app/Providers/AdminServiceProvider.phpindex ff50e60680..81a71c9765 100644--- a/app/Providers/AdminServiceProvider.php+++ b/app/Providers/AdminServiceProvider.php@@ -27,6 +27,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;use Illuminate\Foundation\Application;use Illuminate\Support\ServiceProvider;+/**+ * Class AdminServiceProvider+ */class AdminServiceProvider extends ServiceProvider{/**diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.phpindex 8a1be3536b..0d6648fe02 100644--- a/app/Providers/BroadcastServiceProvider.php+++ b/app/Providers/BroadcastServiceProvider.php@@ -34,6 +34,9 @@ namespace FireflyIII\Providers;use Illuminate\Support\Facades\Broadcast;use Illuminate\Support\ServiceProvider;+/**+ * Class BroadcastServiceProvider+ */class BroadcastServiceProvider extends ServiceProvider{/**diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.phpindex 7e70201de8..9bae19be71 100644--- a/app/Providers/FireflySessionProvider.php+++ b/app/Providers/FireflySessionProvider.php@@ -26,6 +26,9 @@ use FireflyIII\Http\Middleware\StartFireflySession;use Illuminate\Session\SessionManager;use Illuminate\Support\ServiceProvider;+/**+ * Class FireflySessionProvider+ */class FireflySessionProvider extends ServiceProvider{/**diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.phpindex 5ed46fffa0..069b882f16 100644--- a/app/Providers/JournalServiceProvider.php+++ b/app/Providers/JournalServiceProvider.php@@ -54,7 +54,7 @@ class JournalServiceProvider extends ServiceProvider}/**- *+ * Register the collector.*/private function registerCollector(){@@ -73,7 +73,7 @@ class JournalServiceProvider extends ServiceProvider}/**- *+ * Register repository.*/private function registerRepository(){@@ -92,7 +92,7 @@ class JournalServiceProvider extends ServiceProvider}/**- *+ * Register the tasker.*/private function registerTasker(){diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.phpindex 10fa2a5a65..91c903487e 100644--- a/app/TransactionRules/Factory/ActionFactory.php+++ b/app/TransactionRules/Factory/ActionFactory.php@@ -29,9 +29,9 @@ use FireflyIII\TransactionRules\Actions\ActionInterface;use Log;/**- * @codeCoverageIgnore- ** Class ActionFactory can create actions.+ *+ * @codeCoverageIgnore*/class ActionFactory{diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.phpindex 9ce21ec569..35cf8f2431 100644--- a/app/TransactionRules/Factory/TriggerFactory.php+++ b/app/TransactionRules/Factory/TriggerFactory.php@@ -30,9 +30,9 @@ use FireflyIII\TransactionRules\Triggers\TriggerInterface;use Log;/**- * @codeCoverageIgnore- ** Class TriggerFactory can create triggers.+ *+ * @codeCoverageIgnore*/class TriggerFactory{diff --git a/app/User.php b/app/User.phpindex d301d96331..1bad9256c7 100644--- a/app/User.php+++ b/app/User.php@@ -59,6 +59,8 @@ class User extends Authenticatableprotected $table = 'users';/**+ * Link to accounts.+ ** @return HasMany*/public function accounts(): HasMany@@ -87,6 +89,8 @@ class User extends Authenticatable}/**+ * Link to attachments+ ** @return HasMany*/public function attachments(): HasMany@@ -95,6 +99,8 @@ class User extends Authenticatable}/**+ * Link to available budgets+ ** @return HasMany*/public function availableBudgets(): HasMany@@ -103,6 +109,8 @@ class User extends Authenticatable}/**+ * Link to bills.+ ** @return HasMany*/public function bills(): HasMany@@ -111,6 +119,8 @@ class User extends Authenticatable}/**+ * Link to budgets.+ ** @return HasMany*/public function budgets(): HasMany@@ -119,6 +129,8 @@ class User extends Authenticatable}/**+ * Link to categories+ ** @return HasMany*/public function categories(): HasMany@@ -127,6 +139,8 @@ class User extends Authenticatable}/**+ * Link to currency exchange rates+ ** @return HasMany*/public function currencyExchangeRates(): HasMany@@ -135,6 +149,8 @@ class User extends Authenticatable}/**+ * Link to export jobs+ ** @return HasMany*/public function exportJobs(): HasMany@@ -143,6 +159,8 @@ class User extends Authenticatable}/**+ * Generates access token.+ ** @return string*/public function generateAccessToken(): string@@ -173,6 +191,8 @@ class User extends Authenticatable}/**+ * Link to import jobs.+ ** @return HasMany*/public function importJobs(): HasMany@@ -181,6 +201,8 @@ class User extends Authenticatable}/**+ * Link to piggy banks.+ ** @return HasManyThrough*/public function piggyBanks(): HasManyThrough@@ -189,6 +211,8 @@ class User extends Authenticatable}/**+ * Link to preferences.+ ** @return HasMany*/public function preferences(): HasMany@@ -197,6 +221,8 @@ class User extends Authenticatable}/**+ * Link to roles.+ ** @return \Illuminate\Database\Eloquent\Relations\BelongsToMany*/public function roles(): BelongsToMany@@ -205,6 +231,8 @@ class User extends Authenticatable}/**+ * Link to rule groups.+ ** @return HasMany*/public function ruleGroups(): HasMany@@ -213,6 +241,8 @@ class User extends Authenticatable}/**+ * Link to rules.+ ** @return HasMany*/public function rules(): HasMany@@ -233,6 +263,8 @@ class User extends Authenticatable}/**+ * Link to tags.+ ** @return HasMany*/public function tags(): HasMany@@ -241,6 +273,8 @@ class User extends Authenticatable}/**+ * Link to transaction journals.+ ** @return HasMany*/public function transactionJournals(): HasMany@@ -249,6 +283,8 @@ class User extends Authenticatable}/**+ * Link to transactions.+ ** @return HasManyThrough*/public function transactions(): HasManyThroughdiff --git a/docker-compose.dockerhub.yml b/docker-compose.dockerhub.ymlindex 28da5f850f..9efec01696 100644--- a/docker-compose.dockerhub.yml+++ b/docker-compose.dockerhub.yml@@ -1,7 +1,7 @@version: '2'services:firefly-db:- image: mysql:latest+ image: mysql:8environment:- MYSQL_DATABASE=firefly_db- MYSQL_USER=firefly_dbdiff --git a/docker-compose.yml b/docker-compose.ymlindex 8e439a1f97..6c411857eb 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -2,7 +2,7 @@ version: '2'services:firefly-db:- image: mysql:latest+ image: mysql:8environment:- MYSQL_DATABASE=firefly_db- MYSQL_USER=firefly_db