Replace enum

This commit is contained in:
James Cole
2025-01-03 09:05:19 +01:00
parent 21165eb3e0
commit 44eafeeae5
55 changed files with 148 additions and 106 deletions

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Enums\TransactionTypeEnum;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use Illuminate\Console\Command;
@@ -42,7 +43,7 @@ class RemovesBills extends Command
public function handle(): int
{
/** @var null|TransactionType $withdrawal */
$withdrawal = TransactionType::where('type', TransactionType::WITHDRAWAL)->first();
$withdrawal = TransactionType::where('type', TransactionTypeEnum::WITHDRAWAL->value)->first();
if (null === $withdrawal) {
return 0;
}