EmbedKeyValueTrait::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\Nexus\Traits;
6
7
use Lit\Nexus\Interfaces\KeyValueInterface;
8
9
/**
10
 * KeyValueInterface implementation which delegating to $innerKeyValue
11
 */
12
trait EmbedKeyValueTrait
13
{
14
    /**
15
     * @var KeyValueInterface
16
     */
17
    protected $innerKeyValue;
18
19
    public function set(string $key, $value)
20
    {
21
        $this->innerKeyValue->set($key, $value);
22
    }
23
24
    public function delete(string $key)
25
    {
26
        $this->innerKeyValue->delete($key);
27
    }
28
29
    public function get(string $key)
30
    {
31
        return $this->innerKeyValue->get($key);
32
    }
33
34
    public function exists(string $key)
35
    {
36
        return $this->innerKeyValue->exists($key);
37
    }
38
39
    /**
40
     * @return KeyValueInterface
41
     */
42
    public function getInnerKeyValue()
43
    {
44
        return $this->innerKeyValue;
45
    }
46
}
47