This package is abandoned and no longer maintained. No replacement package was suggested.

Custom Type Enum Constants

0.0.4 2022-04-19 16:08 UTC

This package is auto-updated.

Last update: 2022-04-25 13:20:28 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

If you have built a project where you create constants for variables like success pending failed so as to have consistency across your codebase then this package is for you. This constants inludes variables for gateways like paystack flutterwave paypal ETC. This package provides class variables that you can call statistically without instantiating the class. Example: Status::PAYSTACK Status::FLUTTWAVE Status::PAYPAL;

PS: If you have any variable that is not here please make a PR and I will gladly merge it.

Installation

You can install the package via composer:

composer require stephenjude/enums

Usage

All the constants we have defined in this package are grouped into different class-based categories. Lets dive into it:

Status

use Stephenjude\Enums\Status;

Status::PENDING; //pending
Status::SUCCESS; //success
Status::FAILED; //failed
Status::WARNING; //warning
Status::ERROR; //error
Status::PUBLISHED; //published
Status::UNPUBLISHED; //unpublished
Status::APPROVED; //approved
Status::REJECTED; //rejected
Status::PROCESSING; //processing
Status::COMPLETED; //completed
Status::CANCELLED; //cancelled

Gateway

use Stephenjude\Enums\Gateway;

Gateway::PAYPAL;  //paypal
Gateway::STRIPE;  //stripe
Gateway::BINANCE;  //binance
Gateway::COINBASE;  //coinbase
Gateway::PAYSTACK;  //paystack
Gateway::FLUTTERWAVE;  //flutterwave
Gateway::BUYPOWER_NG;  //buypowerng
Gateway::BANK_TRANSFER;  //bank_transfer

FileType

use Stephenjude\Enums\FileType;

FileType::VIDEO; //video
FileType::AUDIO; //audio
FileType::DOCUMENT; //document
FileType::TEXT; //text
FileType::PDF; //pdf

Currency

use Stephenjude\Enums\Currency;

Currency::USD;  //usd
Currency::CAD;  //cad
Currency::EUR;  //eur
Currency::GBP;  //gbp
Currency::NGN;  //ngn

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.