Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

ArrayStorage find() deletes entires #97

Open
@cvejanovic

Description

@cvejanovic

Looks like the find() method is a copy of the delete() method. It unsets the key rather than returning it.

https://github.com/doctrine/KeyValueStore/blob/master/lib/Doctrine/KeyValueStore/Storage/ArrayStorage.php#L124

`public function find($storageName, $key)
{
if (!isset($this->data[$storageName])) {
throw new NotFoundException();
}

    if (!isset($this->data[$storageName][serialize($key)])) {
        throw new NotFoundException();
    }

    unset($this->data[$storageName][serialize($key)]);
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions