Skip to content

Allow sorting arrays which implement \ArrayAccess #12

@mallorydxw

Description

@mallorydxw

This is wrong:

    public static function sortBy($array, $callback)
    {
        if (!is_callable($callback) || !is_array($array)) {
            trigger_error('Arguments are in the wrong order', E_USER_ERROR);
        } //@codeCoverageIgnore

It should also accept classes which implement \ArrayAccess.

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