Skip to content

Hopping on the Enum train #206

Description

@szepeviktor

How about using Backed Enums instead of constants?

enum HttpStatus: int
{
    case OK = 200;
    case Created = 201;
    case Accepted = 202;
    case NoContent = 204;
    case ResetContent = 205;

Needs PHP 8.1 (already EOL)

"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions