Skip to content

Naming convention for enumerations #16538

Closed
@0x6d6c

Description

@0x6d6c

Moved from symfony/symfony#45516.


Description

According to coding standards, PHP classes of type Interface and Trait should have a suffix: Trait and Interface respectively:

  • Suffix interfaces with Interface;
  • Suffix traits with Trait;

PHP 8.1 introduced enumerations that are also some kind of a PHP class so I think that for consistency reasons Enum suffixes should be added as a new naming convention:

Example

  • Suffix enumerations with Enum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions