Map::addMapping()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
}