Listing   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 27
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addTransformer() 0 4 1
A getTransformers() 0 3 1
A clear() 0 4 1
1
<?php
2
3
namespace Riesenia\Pohoda\ValueTransformer;
4
5
class Listing
6
{
7
    /**
8
     * A set of transformers that will be used when serializing data.
9
     *
10
     * @var ValueTransformerInterface[]
11
     */
12
    protected array $list = [];
13
14
    /**
15
     * @return ValueTransformerInterface[]
16
     */
17 95
    public function getTransformers(): array
18
    {
19 95
        return $this->list;
20
    }
21
22 7
    public function addTransformer(ValueTransformerInterface $transformer): self
23
    {
24 7
        $this->list[] = $transformer;
25 7
        return $this;
26
    }
27
28 6
    public function clear(): self
29
    {
30 6
        $this->list = [];
31 6
        return $this;
32
    }
33
}
34