BkoolFitSdkMapping::toInternal()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
/*
4
 * This file is part of the Runalyze Device List.
5
 *
6
 * (c) RUNALYZE <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Runalyze\Devices\Mapping;
13
14
class BkoolFitSdkMapping
15
{
16
    /** @var int[]|string[] */
17
    protected $Mapping = [];
18
19
    protected function getMapping()
20
    {
21
        return [
22
        ];
23
        /*
24
         * Unknown:
25
         * 2
26
         * 16
27
         * 18
28
         * 22
29
         * 24
30
         * 55
31
         * 2240
32
         * 2800
33
         * 2900
34
         *
35
         */
36
    }
37
38
    public function __construct()
39
    {
40
        $this->Mapping = $this->getMapping();
41
    }
42
43
    /**
44
     * @param  int|string $value
45
     * @return int|string
46
     */
47
    public function toInternal($value)
48
    {
49
        if (isset($this->Mapping[$value])) {
50
            return $this->Mapping[$value];
51
        }
52
53
        return;
54
    }
55
}
56