php-enum
php-enum copied to clipboard
Allow to specify getValue return type
trafficstars
Not sure why exactly getValue method is final. I want to be able to specify exactly which type is returned there without using php doc. So would like to override getValue method and specify string there. Any reasons why you don't allow to use covariance in this specific case?
I would be interested in your use case here first. Especially why PHP doc is not an option.
In general overwriting getValue doesn't make much sense and it would loose guaranty that it's actually returning the enum value and not something else.
closed due to inactivity