Open
Description
Thanks for this library MyClabs :)
Not sure if this should be resolved or not. I find it problematic that when searching, the method does not consider that there may be several constants with same values. Example of an international dialling code enum:
const ITA = '39'; // this is fine and unique value.
const IMN = '44'; // UK and Isle of Man share the same code.
const GBR = '44'; // UK and Isle of Man share the same code.
Then when I instantiate the Enum like so:
$testEnum = new CountryCallingCode(CountryCallingCode::GBR);
var_dump($testEnum->getKey()); // return IMN not GBR!!
Metadata
Metadata
Assignees
Labels
No labels