EmbedSingleValueTrait   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A getInnerSingleValue() 0 3 1
A set() 0 3 1
A exists() 0 3 1
A delete() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\Nexus\Traits;
6
7
use Lit\Nexus\Interfaces\SingleValueInterface;
8
9
trait EmbedSingleValueTrait
10
{
11
    /**
12
     * @var SingleValueInterface
13
     */
14
    protected $innerSingleValue;
15
16
    public function get()
17
    {
18
        return $this->innerSingleValue->get();
19
    }
20
21
    public function delete()
22
    {
23
        $this->innerSingleValue->delete();
24
    }
25
26
    public function exists()
27
    {
28
        return $this->innerSingleValue->exists();
29
    }
30
31
    public function set($value)
32
    {
33
        $this->innerSingleValue->set($value);
34
    }
35
36
    /**
37
     * @return SingleValueInterface
38
     */
39
    public function getInnerSingleValue()
40
    {
41
        return $this->innerSingleValue;
42
    }
43
}
44