Passed
Push — master ( 6139d1...678a4c )
by Petr
13:22 queued 10:27
created

Entity   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 38
ccs 10
cts 12
cp 0.8333
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A set() 0 3 1
A __construct() 0 3 1
A getFormat() 0 3 1
A get() 0 3 1
A __clone() 0 2 1
1
<?php
2
3
namespace kalanis\kw_mapper\Storage\Storage\MultiContent;
4
5
6
use kalanis\kw_mapper\Interfaces\IFileFormat;
7
8
9
/**
10
 * Class Entity
11
 * @package kalanis\kw_mapper\Storage\Storage\MultiContent
12
 */
13
class Entity
14
{
15
    /** @var IFileFormat|null */
16
    protected $formatClass = null;
17
    /** @var string[] */
18
    protected $storage = [];
19
20 1
    public function __construct(IFileFormat $formatClass)
21
    {
22 1
        $this->formatClass = $formatClass;
23 1
    }
24
25
    /**
26
     * @codeCoverageIgnore why someone would run that?!
27
     */
28
    private function __clone()
29
    {
30
    }
31
32
    /**
33
     * @return string[]
34
     */
35 1
    public function get(): array
36
    {
37 1
        return $this->storage;
38
    }
39
40
    /**
41
     * @param string[] $content
42
     */
43 1
    public function set(array $content): void
44
    {
45 1
        $this->storage = $content;
46 1
    }
47
48 1
    public function getFormat(): ?IFileFormat
49
    {
50 1
        return $this->formatClass;
51
    }
52
}
53