BrytonFitSdkMapping   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 36
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMapping() 0 12 1
A __construct() 0 4 1
A toInternal() 0 8 2
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 BrytonFitSdkMapping
15
{
16
    /** @var int[]|string[] */
17
    protected $Mapping = [];
18
19
    protected function getMapping()
20
    {
21
        return [
22
        ];
23
        /*
24
         * Unknown:
25
         * 1505
26
         * 1508
27
         * 1509
28
         * 1610
29
         */
30
    }
31
32
    public function __construct()
33
    {
34
        $this->Mapping = $this->getMapping();
35
    }
36
37
    /**
38
     * @param  int|string $value
39
     * @return int|string
40
     */
41
    public function toInternal($value)
42
    {
43
        if (isset($this->Mapping[$value])) {
44
            return $this->Mapping[$value];
45
        }
46
47
        return;
48
    }
49
}
50