Feature #82412

Task #82404: Improve enumeration usage

Add magic static call to enumeration class

Added by Romain Canon about 2 years ago. Updated about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
Category:
-
Start date:
2017-09-09
Due date:
% Done:

0%

PHP Version:
7.0
Tags:
enumeration,enum
Complexity:
Sprint Focus:

Description

See epic ticket for more information.

Introducing magic static methods calls, to dramatically ease readability:

// Old way:
$myEnum = MyEnum::cast(MyEnum::MY_VALUE);

// New way:
$myEnum = MyEnum::MY_VALUE();

History

#1 Updated by Mathias Brodala over 1 year ago

  • Sprint Focus deleted (On Location Sprint)

#2 Updated by Susanne Moog about 1 year ago

  • Target version changed from 9 LTS to Candidate for Major Version

Also available in: Atom PDF