Skip to content

Feature request - Allow usage of enums #17

Description

@Zheness

Hello,

It could be great to have enum field as argument, to restrict values that can be passed in parameters.

Example:

@param Enum['cat', 'dog', 'horse'] $animal

Or with support of multiple types:

$order = ['asc', 'desc'];
$availability = ['first day', 'second day', 'both'];
$widthAllowed = [45, 250, 700];

So if I send the value third day for my parameter $availability, it can returns me an error.

Thanks

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions