PHPackages                             stephenjude/enums - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stephenjude/enums

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

stephenjude/enums
=================

Custom Type Enum Constants

0.0.4(4y ago)21.8kMITPHPPHP ^7.4|^8.0

Since Apr 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/stephenjude/custom-class-enums)[ Packagist](https://packagist.org/packages/stephenjude/enums)[ Docs](https://github.com/stephenjude/enums)[ Fund](https://github.com/stephenjude)[ GitHub Sponsors](https://github.com/stephenjude)[ RSS](/packages/stephenjude-enums/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Custom Class Constants (Enums)
==============================

[](#custom-class-constants-enums)

[![Latest Version on Packagist](https://camo.githubusercontent.com/05eb686f186ea2fdbc3ffed0906f4ad1c7da3f79f111971698cfa97e337c67d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374657068656e6a7564652f656e756d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stephenjude/enums)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ac44fe56a6f88189f0e3d87ba9968e6b240fb06df4ed7177fede0abd1dee625e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7374657068656e6a7564652f656e756d732f54657374733f6c6162656c3d7465737473)](https://github.com/stephenjude/enums/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/7d95416d3d0d29f0550ddba9743636a20a2010f117eb3a0c5758b545d9a46dd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374657068656e6a7564652f656e756d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stephenjude/enums)

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.

[](#ps-if-you-have-any-variable-that-is-not-here-please-make-a-pr-and-i-will-gladly-merge-it)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require stephenjude/enums
```

Usage
-----

[](#usage)

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

### Status

[](#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

[](#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

[](#filetype)

```
use Stephenjude\Enums\FileType;

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

### Currency

[](#currency)

```
use Stephenjude\Enums\Currency;

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

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [stephenjude](https://github.com/stephenjude)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Total

4

Last Release

1481d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb8b712638a0d72afbc4e21574989fdfc33717a69ea3070e92104183db8068f9?d=identicon)[stephenjude](/maintainers/stephenjude)

---

Top Contributors

[![stephenjude](https://avatars.githubusercontent.com/u/31182887?v=4)](https://github.com/stephenjude "stephenjude (17 commits)")

---

Tags

stephenjudeenums

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stephenjude-enums/health.svg)

```
[![Health](https://phpackages.com/badges/stephenjude-enums/health.svg)](https://phpackages.com/packages/stephenjude-enums)
```

###  Alternatives

[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

118126.9k](/packages/stephenjude-filament-feature-flags)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26411.7k](/packages/stephenjude-laravel-wallet)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[brysem/phpenums

Enums made simple in PHP.

10171.5k](/packages/brysem-phpenums)[defstudio/enum-features

A simple trait to enable a feature system using Enums and Laravel Pennant

162.1k](/packages/defstudio-enum-features)[sakanjo/laravel-easy-enum

Easily work with enum.

101.4k1](/packages/sakanjo-laravel-easy-enum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
