Passed
Pull Request — master (#149)
by Pierre
03:06
created

Wrapper::getValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Knp\DictionaryBundle\Dictionary;
6
7
use Knp\DictionaryBundle\Dictionary;
8
9
/**
10
 * @template E
11
 * @implements Dictionary<E>
12
 */
13
abstract class Wrapper implements Dictionary
14
{
15
    /**
16
     * @var Dictionary<E>
17
     */
18
    private $wrapped;
19
20
    /**
21
     * @param Dictionary<E> $wrapped
22
     */
23 19
    public function __construct(Dictionary $wrapped)
24
    {
25 19
        $this->wrapped = $wrapped;
26 19
    }
27
28 4
    public function getName(): string
29
    {
30 4
        return $this->wrapped->getName();
31
    }
32
33 6
    public function getValues(): array
34
    {
35 6
        return $this->wrapped->getValues();
36
    }
37
38 2
    public function getKeys(): array
39
    {
40 2
        return $this->wrapped->getKeys();
41
    }
42
43 1
    public function offsetExists($offset)
44
    {
45 1
        return $this->wrapped->offsetExists($offset);
46
    }
47
48 3
    public function offsetGet($offset)
49
    {
50 3
        return $this->wrapped->offsetGet($offset);
51
    }
52
53 1
    public function offsetSet($offset, $value): void
54
    {
55 1
        $this->wrapped->offsetSet($offset, $value);
56 1
    }
57
58 1
    public function offsetUnset($offset): void
59
    {
60 1
        $this->wrapped->offsetUnset($offset);
61 1
    }
62
63 1
    public function count(): int
64
    {
65 1
        return $this->wrapped->count();
66
    }
67
68
    /**
69
     * @return Dictionary<E>
70
     */
71 2
    public function getIterator(): Dictionary
72
    {
73 2
        return $this->wrapped;
74
    }
75
}
76