Map   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSources() 0 3 1
A getTargets() 0 3 1
A addMapping() 0 4 1
1
<?php
2
namespace Aoe\Asdis\Content\Replacement;
3
4
/**
5
 * A content replacement map.
6
 */
7
class Map
8
{
9
    /**
10
     * @var array
11
     */
12
    private $sources = [];
13
14
    /**
15
     * @var array
16
     */
17
    private $targets = [];
18
19
    /**
20
     * @param string $source
21
     * @param string $target
22
     */
23 3
    public function addMapping($source, $target)
24
    {
25 3
        $this->sources[] = $source;
26 3
        $this->targets[] = $target;
27 3
    }
28
29
    /**
30
     * @return array
31
     */
32 3
    public function getSources()
33
    {
34 3
        return $this->sources;
35
    }
36
37
    /**
38
     * @return array
39
     */
40 3
    public function getTargets()
41
    {
42 3
        return $this->targets;
43
    }
44
}