SportMapper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 83
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMap() 0 21 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace SportTrackerConnector\Endomondo;
6
7
use SportTrackerConnector\Core\Workout\AbstractSportMapper;
8
9
/**
10
 * Sport mapper for Endomondo tracker.
11
 */
12
class SportMapper extends AbstractSportMapper
13
{
14
    const SPORT_RUNNING = '0';
15
    const SPORT_RUNNING_TREADMILL = '88';
16
    const SPORT_CYCLING_TRANSPORT = '1';
17
    const SPORT_CYCLING_SPORT = '2';
18
    const SPORT_MOUNTAIN_BIKING = '3';
19
    const SPORT_SKATING = '4';
20
    const SPORT_ROLLER_SKIING = '5';
21
    const SPORT_SKIING_CROSS_COUNTRY = '6';
22
    const SPORT_SKIING_DOWNHILL = '7';
23
    const SPORT_SNOWBOARDING = '8';
24
    const SPORT_KAYAKING = '9';
25
    const SPORT_KITE_SURFING = '10';
26
    const SPORT_ROWING = '11';
27
    const SPORT_SAILING = '12';
28
    const SPORT_WINDSURFING = '13';
29
    const SPORT_FITNESS_WALKING = '14';
30
    const SPORT_GOLF = '15';
31
    const SPORT_HIKING = '16';
32
    const SPORT_ORIENTEERING = '17';
33
    const SPORT_WALKING = '18';
34
    const SPORT_RIDING = '19';
35
    const SPORT_SWIMMING = '20';
36
    const SPORT_CYCLING_INDOOR = '21';
37
    const SPORT_OTHER = '22';
38
    const SPORT_AEROBICS = '23';
39
    const SPORT_BADMINTON = '24';
40
    const SPORT_BASEBALL = '25';
41
    const SPORT_BASKETBALL = '26';
42
    const SPORT_BOXING = '27';
43
    const SPORT_CLIMBING_STAIRS = '28';
44
    const SPORT_CRICKET = '29';
45
    const SPORT_CROSS_TRAINING = '30';
46
    const SPORT_DANCING = '31';
47
    const SPORT_FENCING = '32';
48
    const SPORT_FOOTBALL_AMERICAN = '33';
49
    const SPORT_FOOTBALL_RUGBY = '34';
50
    const SPORT_FOOTBALL_SOCCER = '35';
51
    const SPORT_HANDBALL = '36';
52
    const SPORT_HOCKEY = '37';
53
    const SPORT_PILATES = '38';
54
    const SPORT_POLO = '39';
55
    const SPORT_SCUBA_DIVING = '40';
56
    const SPORT_SQUASH = '41';
57
    const SPORT_TABLE_TENNIS = '42';
58
    const SPORT_TENNIS = '43';
59
    const SPORT_VOLLEYBALL_BEACH = '44';
60
    const SPORT_VOLLEYBALL_INDOOR = '45';
61
    const SPORT_WEIGHT_TRAINING = '46';
62
    const SPORT_YOGA = '47';
63
    const SPORT_MARTIAL_ARTS = '48';
64
    const SPORT_GYMNASTICS = '49';
65
    const SPORT_STEP_COUNTER = '50';
66
    const SPORT_CIRCUIT_TRAINING = '87';
67
    const SPORT_CLIMBING = '93';
68
    const SPORT_ICE_SKATING = '100';
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function getMap(): array
74
    {
75
        return array(
76
            self::RUNNING => self::SPORT_RUNNING,
77
            self::RUNNING_TREADMILL => self::SPORT_RUNNING_TREADMILL,
78
            self::WALKING => self::SPORT_WALKING,
79
            self::WALKING_FITNESS => self::SPORT_FITNESS_WALKING,
80
            self::CYCLING_SPORT => self::SPORT_CYCLING_SPORT,
81
            self::CYCLING_TRANSPORT => self::SPORT_CYCLING_TRANSPORT,
82
            self::CYCLING_INDOOR => self::SPORT_CYCLING_INDOOR,
83
            self::CYCLING_MOUNTAIN => self::SPORT_MOUNTAIN_BIKING,
84
            self::SWIMMING => self::SPORT_SWIMMING,
85
            self::GOLF => self::SPORT_GOLF,
86
            self::KAYAKING => self::SPORT_KAYAKING,
87
            self::KITE_SURFING => self::SPORT_KITE_SURFING,
88
            self::HIKING => self::SPORT_HIKING,
89
            self::SKATING => self::SPORT_SKATING,
90
            self::WEIGHT_TRAINING => self::SPORT_WEIGHT_TRAINING,
91
            self::OTHER => self::SPORT_OTHER,
92
        );
93
    }
94
}
95