Initial commit
This commit is contained in:
21
app/Enums/WalletTransactionType.php
Normal file
21
app/Enums/WalletTransactionType.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum WalletTransactionType: string
|
||||
{
|
||||
case CREDIT = 'credit';
|
||||
case DEBIT = 'debit';
|
||||
|
||||
public function isDebit(): bool
|
||||
{
|
||||
return $this === self::DEBIT;
|
||||
}
|
||||
|
||||
public function isCredit(): bool
|
||||
{
|
||||
return $this === self::CREDIT;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user