for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the webmozart/key-value-store package.
*
* (c) Bernhard Schussek <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webmozart\KeyValueStore;
use Webmozart\KeyValueStore\Api\CountableStore;
use Webmozart\KeyValueStore\Api\NoSuchKeyException;
use Webmozart\KeyValueStore\Api\SortableStore;
/**
* A key-value store that does nothing.
* @since 1.0
* @author Bernhard Schussek <[email protected]>
class NullStore implements SortableStore, CountableStore
{
* {@inheritdoc}
public function set($key, $value)
}
public function get($key, $default = null)
return $default;
public function getOrFail($key)
throw NoSuchKeyException::forKey($key);
public function getMultiple(array $keys, $default = null)
return array_fill_keys($keys, $default);
public function getMultipleOrFail(array $keys)
throw NoSuchKeyException::forKeys($keys);
public function remove($key)
return false;
public function exists($key)
public function clear()
public function keys()
return array();
public function sort($flags = SORT_REGULAR)
public function count()
return 0;