diff --git a/app/Abstracts/Reports/Listener.php b/app/Abstracts/Listeners/Report.php similarity index 98% rename from app/Abstracts/Reports/Listener.php rename to app/Abstracts/Listeners/Report.php index 7db7fe65d..85ba4ad0a 100644 --- a/app/Abstracts/Reports/Listener.php +++ b/app/Abstracts/Listeners/Report.php @@ -1,6 +1,6 @@ alias != static::ALIAS) { - return false; + return true; } // Do not apply to the same or newer versions if (version_compare($event->old, static::VERSION, '>=')) { - return false; + return true; } - return true; + return false; + } + + /** + * @deprecated since 2.0 + */ + public function check($event) + { + return !$this->skipThisUpdate($event); } } diff --git a/app/Abstracts/Reports/Report.php b/app/Abstracts/Report.php similarity index 99% rename from app/Abstracts/Reports/Report.php rename to app/Abstracts/Report.php index c72e0ad4d..ebb362e55 100644 --- a/app/Abstracts/Reports/Report.php +++ b/app/Abstracts/Report.php @@ -1,6 +1,6 @@ check($event)) { + if ($this->skipThisUpdate($event)) { return; } diff --git a/app/Listeners/Update/V20/Version201.php b/app/Listeners/Update/V20/Version201.php index fc26a226e..58cd191f0 100644 --- a/app/Listeners/Update/V20/Version201.php +++ b/app/Listeners/Update/V20/Version201.php @@ -2,8 +2,8 @@ namespace App\Listeners\Update\V13; +use App\Abstracts\Listeners\Update as Listener; use App\Events\Install\UpdateFinished as Event; -use App\Listeners\Update\Listener; use Artisan; class Version201 extends Listener @@ -20,8 +20,7 @@ class Version201 extends Listener */ public function handle(Event $event) { - // Check if should listen - if (!$this->check($event)) { + if ($this->skipThisUpdate($event)) { return; } diff --git a/app/Reports/ExpenseSummary.php b/app/Reports/ExpenseSummary.php index 2514bca55..a99cd5023 100644 --- a/app/Reports/ExpenseSummary.php +++ b/app/Reports/ExpenseSummary.php @@ -2,7 +2,7 @@ namespace App\Reports; -use App\Abstracts\Reports\Report; +use App\Abstracts\Report; use App\Models\Banking\Transaction; use App\Models\Expense\Bill; use App\Utilities\Recurring; diff --git a/app/Reports/IncomeExpenseSummary.php b/app/Reports/IncomeExpenseSummary.php index e07aa90af..b581a72eb 100644 --- a/app/Reports/IncomeExpenseSummary.php +++ b/app/Reports/IncomeExpenseSummary.php @@ -2,7 +2,7 @@ namespace App\Reports; -use App\Abstracts\Reports\Report; +use App\Abstracts\Report; use App\Models\Banking\Transaction; use App\Models\Expense\Bill; use App\Models\Income\Invoice; diff --git a/app/Reports/IncomeSummary.php b/app/Reports/IncomeSummary.php index b6196c372..fd0c5cc00 100644 --- a/app/Reports/IncomeSummary.php +++ b/app/Reports/IncomeSummary.php @@ -2,7 +2,7 @@ namespace App\Reports; -use App\Abstracts\Reports\Report; +use App\Abstracts\Report; use App\Models\Banking\Transaction; use App\Models\Income\Invoice; use App\Utilities\Recurring; diff --git a/app/Reports/ProfitLoss.php b/app/Reports/ProfitLoss.php index e2a938b7f..9640ce8f0 100644 --- a/app/Reports/ProfitLoss.php +++ b/app/Reports/ProfitLoss.php @@ -2,7 +2,7 @@ namespace App\Reports; -use App\Abstracts\Reports\Report; +use App\Abstracts\Report; use App\Models\Banking\Transaction; use App\Models\Expense\Bill; use App\Models\Income\Invoice; diff --git a/app/Reports/TaxSummary.php b/app/Reports/TaxSummary.php index c5051f785..c2f00c0e0 100644 --- a/app/Reports/TaxSummary.php +++ b/app/Reports/TaxSummary.php @@ -2,7 +2,7 @@ namespace App\Reports; -use App\Abstracts\Reports\Report; +use App\Abstracts\Report; use App\Models\Banking\Transaction; use App\Models\Expense\Bill; use App\Models\Income\Invoice;