Completed
Push — master ( 7b9015...c5b311 )
by Vladimir
26s queued 11s
created

RedirectMapper::getRedirects()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace allejo\stakx;
4
5
class RedirectMapper
6
{
7
    /** @var array<string, string> */
8
    private $urlMap;
9
10 12
    public function __construct()
11
    {
12 12
        $this->urlMap = [];
13 12
    }
14
15
    public function registerRedirect($from, $to)
16
    {
17
        $this->urlMap[$from] = $to;
18
    }
19
20
    public function getRedirects()
21
    {
22
        return $this->urlMap;
23
    }
24
}
25