eloquent / enumeration

An enumeration implementation for PHP.
MIT License
147 stars 8 forks source link

FIX: Return static docblocks #20

Closed Bilge closed 8 years ago

Bilge commented 8 years ago

This fixes static analysis in editors such as PhpStorm. This enables calls such as MyEnum::memberByValue($foo) to return MyEnum instead of ValueMultitonInterface during static analysis thus avoiding warnings that ValueMultitonInterface does not match the expected type MyEnum when MyEnum is used as a type hint for method calls.

ezzatron commented 8 years ago

Thanks. Had to manually merge because of out-of-date contribution guidelines (not your fault). Released in 5.1.1.

Bilge commented 8 years ago

Thanks, breh. Keep making awesome libraries.