| Code Coverage | ||||||||||
| Classes and Traits | Functions and Methods | Lines | ||||||||
| Total |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 7 | CRAP |  | 0.00% | 0 / 13 | 
| NullStorageExpirable |  | 0.00% | 0 / 1 |  | 56.25% | 9 / 16 | 272 |  | 0.00% | 0 / 13 | 
| __construct |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| has |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| get |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| getMultiple |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| getAll |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| set |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| setIfNotExists |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| setMultiple |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| rename |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 1 | |||
| delete |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| deleteMultiple |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| deleteAll |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| getCollectionName |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| setMultipleWithExpire |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| setWithExpire |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| setWithExpireIfNotExists |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 0 / 0 | |||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\KeyValueStore\NullStorageExpirable. | |
| */ | |
| namespace Drupal\Core\KeyValueStore; | |
| /** | |
| * Defines a null key/value store implementation. | |
| */ | |
| class NullStorageExpirable implements KeyValueStoreExpirableInterface { | |
| /** | |
| * The actual storage of key-value pairs. | |
| * | |
| * @var array | |
| */ | |
| protected $data = array(); | |
| /** | |
| * The name of the collection holding key and value pairs. | |
| * | |
| * @var string | |
| */ | |
| protected $collection; | |
| /** | |
| * Creates a new expirable null key/value store. | |
| */ | |
| public function __construct($collection) { | |
| $this->collection = $collection; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function has($key) { | |
| return FALSE; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function get($key, $default = NULL) { | |
| return NULL; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getMultiple(array $keys) { | |
| return array(); | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getAll() { | |
| return array(); | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function set($key, $value) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function setIfNotExists($key, $value) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function setMultiple(array $data) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function rename($key, $new_key) { | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function delete($key) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function deleteMultiple(array $keys) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function deleteAll() { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getCollectionName() { | |
| return $this->collection; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function setMultipleWithExpire(array $data, $expire) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function setWithExpire($key, $value, $expire) { } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function setWithExpireIfNotExists($key, $value, $expire) { } | |
| } |