Skip to content

Most methods do not consider constants with same values. #65

@keithmifsud

Description

@keithmifsud

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions