Skip to content
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

Should not return false when the key don't exist #6

Open
estheban opened this issue Jan 28, 2015 · 0 comments
Open

Should not return false when the key don't exist #6

estheban opened this issue Jan 28, 2015 · 0 comments
Labels

Comments

@estheban
Copy link
Member

class KeyValueStore

/**
     * Gets the value of the exact key
     *
     * @param string $key
     * @return mixed
     */
    public function get($key)
    {
        $value = $this->em->getRepository('ElcwebKeyValueStoreBundle:KeyValue')->findOneByKey($key);

        if (!$value) {
            return false;
        }

        return $value->getValue();
    }
@estheban estheban added the bug label Jan 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant