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

LocatorHelper::mapLocatorLabelToRenderVariable()   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 1
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 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