Skip to content

Method equals is incorrect working #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peter-gribanov opened this issue Mar 24, 2017 · 2 comments
Closed

Method equals is incorrect working #47

peter-gribanov opened this issue Mar 24, 2017 · 2 comments

Comments

@peter-gribanov
Copy link
Contributor

peter-gribanov commented Mar 24, 2017

Method equals() only check values from enumerations.
Not check type of enumerations class.

Example error:

class CommandAction extends Enum
{
    const EDIT = 'edit';
    const CREATE = 'create';
    const UPDATE = 'update';
    const DELEGATE = 'delegate';
}
class QueryAction extends Enum
{
    const VIEW = 'view';
}
class AccessRule extends Enum
{
    const VIEW = 'view';
    const EDIT = 'edit';
    const CREATE = 'create';
    const UPDATE = 'update';
    const DELEGATE = 'delegate';
}

Expected

CommandAction::EDIT()->equals(AccessRule::EDIT()); // false

Actual

CommandAction::EDIT()->equals(AccessRule::EDIT()); // true
@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Hey nice catch! I can't believe it's been under our nose for so long ^^

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Fix in #48 and released

@mnapoli mnapoli closed this as completed Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants