EscolaLMS/payments

View on GitHub
src/Enums/Currency.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

namespace EscolaLms\Payments\Enums;

use EscolaLms\Core\Enums\BasicEnum;
use Money\Currency as MoneyCurrency;

class Currency extends BasicEnum
{
    public const PLN = 'PLN';
    public const USD = 'USD';
    public const EUR = 'EUR';
    public const GBP = 'GBP';

    public function toMoneyCurrency(): MoneyCurrency
    {
        return new MoneyCurrency($this->value);
    }
}