Passed
Push — feature/locators-issue-82 ( cd9965...0ff576 )
by Sebastian
04:35
created

LocatorHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 9
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A mapLocatorLabelToRenderVariable() 0 3 1
1
<?php
2
/*
3
 * citeproc-php: LocatorHelper.php
4
 * User: Sebastian Böttger <[email protected]>
5
 * created at 07.04.20, 22:31
6
 */
7
8
namespace Seboettg\CiteProc\Util;
9
10
class LocatorHelper
11
{
12
    private const LABEL_TO_VARIABLE_MAP = [
13
        "page" => "page",
14
        "chapter" => "chapter-number",
15
        "issue" => "folio",
16
        "note" => "note",
17
        "section" => "section",
18
        "volume" => "volume"
19
    ];
20
21 1
    public static function mapLocatorLabelToRenderVariable($label)
22
    {
23 1
        return self::LABEL_TO_VARIABLE_MAP[$label];
24
    }
25
}
26